@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.
Files changed (135) hide show
  1. package/bin/awk.js +630 -52
  2. package/bin/claude-generators.js +122 -0
  3. package/core/AGENTS.md +54 -0
  4. package/core/CLAUDE.md +155 -0
  5. package/core/GEMINI.md +44 -9
  6. package/core/GEMINI.md.bak +126 -199
  7. package/package.json +1 -1
  8. package/skills/ai-sprite-maker/SKILL.md +81 -0
  9. package/skills/ai-sprite-maker/scripts/animate_sprite.py +102 -0
  10. package/skills/ai-sprite-maker/scripts/process_sprites.py +140 -0
  11. package/skills/awf-session-restore/SKILL.md +12 -2
  12. package/skills/brainstorm-agent/SKILL.md +11 -8
  13. package/skills/code-review/SKILL.md +21 -33
  14. package/skills/gitnexus/gitnexus-cli/SKILL.md +82 -0
  15. package/skills/gitnexus/gitnexus-debugging/SKILL.md +89 -0
  16. package/skills/gitnexus/gitnexus-exploring/SKILL.md +78 -0
  17. package/skills/gitnexus/gitnexus-guide/SKILL.md +64 -0
  18. package/skills/gitnexus/gitnexus-impact-analysis/SKILL.md +97 -0
  19. package/skills/gitnexus/gitnexus-refactoring/SKILL.md +121 -0
  20. package/skills/lucylab-tts/SKILL.md +64 -0
  21. package/skills/lucylab-tts/resources/voices_library.json +908 -0
  22. package/skills/lucylab-tts/scripts/.env +1 -0
  23. package/skills/lucylab-tts/scripts/lucylab_tts.py +506 -0
  24. package/skills/nm-memory-sync/SKILL.md +14 -1
  25. package/skills/orchestrator/SKILL.md +5 -38
  26. package/skills/ship-to-code/SKILL.md +115 -0
  27. package/skills/short-maker/SKILL.md +150 -0
  28. package/skills/short-maker/_backup/storyboard.html +106 -0
  29. package/skills/short-maker/_backup/video_mixer.py +296 -0
  30. package/skills/short-maker/outputs/fitbite-promo/background.jpg +0 -0
  31. package/skills/short-maker/outputs/fitbite-promo/final/promo-final.mp4 +0 -0
  32. package/skills/short-maker/outputs/fitbite-promo/script.md +19 -0
  33. package/skills/short-maker/outputs/fitbite-promo/segments/scene-01.mp4 +0 -0
  34. package/skills/short-maker/outputs/fitbite-promo/segments/scene-02.mp4 +0 -0
  35. package/skills/short-maker/outputs/fitbite-promo/segments/scene-03.mp4 +0 -0
  36. package/skills/short-maker/outputs/fitbite-promo/segments/scene-04.mp4 +0 -0
  37. package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-01.png +0 -0
  38. package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-02.png +0 -0
  39. package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-03.png +0 -0
  40. package/skills/short-maker/outputs/fitbite-promo/storyboard/scene-04.png +0 -0
  41. package/skills/short-maker/outputs/fitbite-promo/storyboard.html +133 -0
  42. package/skills/short-maker/outputs/fitbite-promo/storyboard.json +38 -0
  43. package/skills/short-maker/outputs/fitbite-promo/temp/merged_chroma.mp4 +0 -0
  44. package/skills/short-maker/outputs/fitbite-promo/temp/merged_crossfaded.mp4 +0 -0
  45. package/skills/short-maker/outputs/fitbite-promo/temp/ready_00.mp4 +0 -0
  46. package/skills/short-maker/outputs/fitbite-promo/temp/ready_01.mp4 +0 -0
  47. package/skills/short-maker/outputs/fitbite-promo/temp/ready_02.mp4 +0 -0
  48. package/skills/short-maker/outputs/fitbite-promo/temp/ready_03.mp4 +0 -0
  49. package/skills/short-maker/outputs/fitbite-promo/tts/manifest.json +31 -0
  50. package/skills/short-maker/outputs/fitbite-promo/tts/scene-01.wav +0 -0
  51. package/skills/short-maker/outputs/fitbite-promo/tts/scene-02.wav +0 -0
  52. package/skills/short-maker/outputs/fitbite-promo/tts/scene-03.wav +0 -0
  53. package/skills/short-maker/outputs/fitbite-promo/tts/scene-04.wav +0 -0
  54. package/skills/short-maker/outputs/fitbite-promo/tts_script.txt +11 -0
  55. package/skills/short-maker/scripts/google-flow-cli/.project-identity +41 -0
  56. package/skills/short-maker/scripts/google-flow-cli/.trae/rules/project_rules.md +52 -0
  57. package/skills/short-maker/scripts/google-flow-cli/CODEBASE.md +67 -0
  58. package/skills/short-maker/scripts/google-flow-cli/GoogleFlowCli.code-workspace +29 -0
  59. package/skills/short-maker/scripts/google-flow-cli/README.md +168 -0
  60. package/skills/short-maker/scripts/google-flow-cli/docs/specs/PROJECT.md +12 -0
  61. package/skills/short-maker/scripts/google-flow-cli/docs/specs/REQUIREMENTS.md +22 -0
  62. package/skills/short-maker/scripts/google-flow-cli/docs/specs/ROADMAP.md +16 -0
  63. package/skills/short-maker/scripts/google-flow-cli/docs/specs/TECH-SPEC.md +13 -0
  64. package/skills/short-maker/scripts/google-flow-cli/gflow/__init__.py +3 -0
  65. package/skills/short-maker/scripts/google-flow-cli/gflow/api/__init__.py +19 -0
  66. package/skills/short-maker/scripts/google-flow-cli/gflow/api/client.py +1921 -0
  67. package/skills/short-maker/scripts/google-flow-cli/gflow/api/models.py +64 -0
  68. package/skills/short-maker/scripts/google-flow-cli/gflow/api/rpc_ids.py +98 -0
  69. package/skills/short-maker/scripts/google-flow-cli/gflow/auth/__init__.py +15 -0
  70. package/skills/short-maker/scripts/google-flow-cli/gflow/auth/browser_auth.py +692 -0
  71. package/skills/short-maker/scripts/google-flow-cli/gflow/auth/humanizer.py +417 -0
  72. package/skills/short-maker/scripts/google-flow-cli/gflow/auth/proxy_ext.py +120 -0
  73. package/skills/short-maker/scripts/google-flow-cli/gflow/auth/recaptcha.py +482 -0
  74. package/skills/short-maker/scripts/google-flow-cli/gflow/batchexecute/__init__.py +5 -0
  75. package/skills/short-maker/scripts/google-flow-cli/gflow/batchexecute/client.py +414 -0
  76. package/skills/short-maker/scripts/google-flow-cli/gflow/cli/__init__.py +1 -0
  77. package/skills/short-maker/scripts/google-flow-cli/gflow/cli/main.py +1075 -0
  78. package/skills/short-maker/scripts/google-flow-cli/pyproject.toml +36 -0
  79. package/skills/short-maker/scripts/google-flow-cli/script.txt +22 -0
  80. package/skills/short-maker/scripts/google-flow-cli/tests/__init__.py +0 -0
  81. package/skills/short-maker/scripts/google-flow-cli/tests/test_batchexecute.py +113 -0
  82. package/skills/short-maker/scripts/google-flow-cli/tests/test_client.py +190 -0
  83. package/skills/short-maker/templates/aida_script.md +40 -0
  84. package/skills/short-maker/templates/mimic_analyzer.md +29 -0
  85. package/skills/single-flow-task-execution/SKILL.md +412 -0
  86. package/skills/single-flow-task-execution/code-quality-reviewer-prompt.md +20 -0
  87. package/skills/single-flow-task-execution/implementer-prompt.md +78 -0
  88. package/skills/single-flow-task-execution/spec-reviewer-prompt.md +61 -0
  89. package/skills/skill-creator/SKILL.md +44 -0
  90. package/skills/spm-build-analysis/SKILL.md +92 -0
  91. package/skills/spm-build-analysis/references/build-optimization-sources.md +155 -0
  92. package/skills/spm-build-analysis/references/recommendation-format.md +85 -0
  93. package/skills/spm-build-analysis/references/spm-analysis-checks.md +105 -0
  94. package/skills/spm-build-analysis/scripts/check_spm_pins.py +118 -0
  95. package/skills/symphony-enforcer/SKILL.md +83 -97
  96. package/skills/symphony-orchestrator/SKILL.md +1 -1
  97. package/skills/trello-sync/SKILL.md +52 -45
  98. package/skills/verification-gate/SKILL.md +13 -2
  99. package/skills/xcode-build-benchmark/SKILL.md +88 -0
  100. package/skills/xcode-build-benchmark/references/benchmark-artifacts.md +94 -0
  101. package/skills/xcode-build-benchmark/references/benchmarking-workflow.md +67 -0
  102. package/skills/xcode-build-benchmark/schemas/build-benchmark.schema.json +230 -0
  103. package/skills/xcode-build-benchmark/scripts/benchmark_builds.py +308 -0
  104. package/skills/xcode-build-fixer/SKILL.md +218 -0
  105. package/skills/xcode-build-fixer/references/build-settings-best-practices.md +216 -0
  106. package/skills/xcode-build-fixer/references/fix-patterns.md +290 -0
  107. package/skills/xcode-build-fixer/references/recommendation-format.md +85 -0
  108. package/skills/xcode-build-fixer/scripts/benchmark_builds.py +308 -0
  109. package/skills/xcode-build-orchestrator/SKILL.md +156 -0
  110. package/skills/xcode-build-orchestrator/references/benchmark-artifacts.md +94 -0
  111. package/skills/xcode-build-orchestrator/references/build-settings-best-practices.md +216 -0
  112. package/skills/xcode-build-orchestrator/references/orchestration-report-template.md +143 -0
  113. package/skills/xcode-build-orchestrator/references/recommendation-format.md +85 -0
  114. package/skills/xcode-build-orchestrator/scripts/benchmark_builds.py +308 -0
  115. package/skills/xcode-build-orchestrator/scripts/diagnose_compilation.py +273 -0
  116. package/skills/xcode-build-orchestrator/scripts/generate_optimization_report.py +533 -0
  117. package/skills/xcode-compilation-analyzer/SKILL.md +89 -0
  118. package/skills/xcode-compilation-analyzer/references/build-optimization-sources.md +155 -0
  119. package/skills/xcode-compilation-analyzer/references/code-compilation-checks.md +106 -0
  120. package/skills/xcode-compilation-analyzer/references/recommendation-format.md +85 -0
  121. package/skills/xcode-compilation-analyzer/scripts/diagnose_compilation.py +273 -0
  122. package/skills/xcode-project-analyzer/SKILL.md +76 -0
  123. package/skills/xcode-project-analyzer/references/build-optimization-sources.md +155 -0
  124. package/skills/xcode-project-analyzer/references/build-settings-best-practices.md +216 -0
  125. package/skills/xcode-project-analyzer/references/project-audit-checks.md +101 -0
  126. package/skills/xcode-project-analyzer/references/recommendation-format.md +85 -0
  127. package/templates/CODEBASE.md +26 -42
  128. package/templates/configs/trello-config.json +2 -2
  129. package/templates/workflow_dual_mode_template.md +5 -5
  130. package/workflows/_uncategorized/conductor-codex.md +125 -0
  131. package/workflows/_uncategorized/conductor.md +97 -0
  132. package/workflows/_uncategorized/ship-to-code.md +85 -0
  133. package/workflows/_uncategorized/trello-sync.md +52 -0
  134. package/workflows/context/codebase-sync.md +10 -87
  135. package/workflows/quality/visual-debug.md +66 -12
@@ -0,0 +1,140 @@
1
+ import sys
2
+ import os
3
+ import math
4
+
5
+ try:
6
+ from PIL import Image
7
+ except ImportError:
8
+ print("Error: Module 'Pillow' is not installed. Vui lòng chạy: pip install Pillow")
9
+ sys.exit(1)
10
+
11
+ def is_green_screen(r, g, b, tolerance=100):
12
+ """
13
+ Thuật toán nhận biết màu nền xanh (green screen / chroma key).
14
+ Bản gốc màu lý tưởng: #00FF00 (0, 255, 0).
15
+ """
16
+ dist = math.sqrt((r - 0)**2 + (g - 255)**2 + (b - 0)**2)
17
+ if dist < tolerance:
18
+ return True
19
+ if g > r + 40 and g > b + 40 and g > 130:
20
+ return True
21
+ return False
22
+
23
+ def align_grid(img, cols, rows):
24
+ width, height = img.size
25
+ orig_cell_w = width // cols
26
+ orig_cell_h = height // rows
27
+
28
+ frames = []
29
+ for r in range(rows):
30
+ for c in range(cols):
31
+ box = (c * orig_cell_w, r * orig_cell_h, c * orig_cell_w + orig_cell_w, r * orig_cell_h + orig_cell_h)
32
+ frames.append(img.crop(box))
33
+
34
+ contents = []
35
+ valid_w = []
36
+ valid_h = []
37
+
38
+ for frame in frames:
39
+ bbox = frame.getbbox()
40
+ if bbox:
41
+ content = frame.crop(bbox)
42
+ w = bbox[2] - bbox[0]
43
+ h = bbox[3] - bbox[1]
44
+ valid_w.append(w)
45
+ valid_h.append(h)
46
+ contents.append((content, w, h))
47
+ else:
48
+ contents.append(None)
49
+
50
+ if not valid_w:
51
+ return img
52
+
53
+ valid_w.sort()
54
+ valid_h.sort()
55
+ # Dùng median thay vì max để loại trừ khung bị lỗi do AI vẽ quá dài (outliers)
56
+ median_w = valid_w[len(valid_w) // 2]
57
+ median_h = valid_h[len(valid_h) // 2]
58
+
59
+ padding = 20
60
+ cell_w = median_w + padding * 2
61
+ cell_h = median_h + padding * 2
62
+
63
+ aligned_frames = []
64
+ for item in contents:
65
+ new_frame = Image.new("RGBA", (cell_w, cell_h), (0,0,0,0))
66
+ if item:
67
+ content, content_w, content_h = item
68
+ shift_x = (cell_w - content_w) // 2
69
+ shift_y = (cell_h - padding) - content_h
70
+ if shift_y < 0: shift_y = 0
71
+ new_frame.paste(content, (shift_x, shift_y))
72
+ aligned_frames.append(new_frame)
73
+
74
+ out_img = Image.new("RGBA", (cell_w * cols, cell_h * rows), (0,0,0,0))
75
+ for i, frame in enumerate(aligned_frames):
76
+ row = i // cols
77
+ col = i % cols
78
+ out_img.paste(frame, (col * cell_w, row * cell_h))
79
+
80
+ return out_img
81
+
82
+ def remove_green_screen(input_path, output_path, align_cols=0, align_rows=0):
83
+ print(f"[*] Bắt đầu đọc tệp ảnh: {input_path}")
84
+ try:
85
+ img = Image.open(input_path).convert("RGBA")
86
+ except Exception as e:
87
+ print(f"[!] Không thể mở file ảnh gốc: {e}")
88
+ sys.exit(1)
89
+
90
+ data = img.getdata()
91
+ new_data = []
92
+
93
+ # Lặp qua các mảng Pixels và lọc màu Chroma-key
94
+ for r, g, b, a in data:
95
+ if a > 0 and is_green_screen(r, g, b, tolerance=110):
96
+ # Các viền pixel ám xanh sẽ được hạ alpha xuống trong suốt tuyệt đối (0)
97
+ new_data.append((255, 255, 255, 0))
98
+ else:
99
+ new_data.append((r, g, b, a))
100
+
101
+ img.putdata(new_data)
102
+
103
+ # Căn chỉnh lưới (Auto-Align) hoặc cắt gọn (Auto-Crop)
104
+ if align_cols > 0 and align_rows > 0:
105
+ print(f"[*] Đang căn chỉnh tự động các frame theo lưới {align_cols}x{align_rows} (đáy chạm đất, giữa tâm)...")
106
+ img = align_grid(img, align_cols, align_rows)
107
+ else:
108
+ bbox = img.getbbox()
109
+ if bbox:
110
+ img = img.crop(bbox)
111
+
112
+ # Tạo cấu trúc thư mục nếu chưa tồn tại
113
+ os.makedirs(os.path.dirname(os.path.abspath(output_path)), exist_ok=True)
114
+ img.save(output_path, "PNG")
115
+ print(f"[*] Thành công! Đã xoá nền và lưu Sprite thành phẩm tại: {output_path}")
116
+
117
+ if __name__ == "__main__":
118
+ if len(sys.argv) < 3:
119
+ print("Cú pháp: python process_sprites.py <file_raw.png> <file_output.png> [--align CxR]")
120
+ sys.exit(1)
121
+
122
+ input_file = sys.argv[1]
123
+ output_file = sys.argv[2]
124
+
125
+ align_c = 0
126
+ align_r = 0
127
+
128
+ if len(sys.argv) >= 5 and sys.argv[3] == "--align":
129
+ try:
130
+ dims = sys.argv[4].lower().split('x')
131
+ align_c = int(dims[0])
132
+ align_r = int(dims[1])
133
+ except:
134
+ print("[!] Lỗi tham số --align. Ví dụ đúng: --align 3x2")
135
+
136
+ if not os.path.exists(input_file):
137
+ print(f"[!] Lỗi: Không tìm thấy đường dẫn file ảnh gốc! ({input_file})")
138
+ sys.exit(1)
139
+
140
+ remove_green_screen(input_file, output_file, align_c, align_r)
@@ -6,8 +6,8 @@ description: |
6
6
  Enforces Project ID → Brain Switch → Memory Read order to prevent cross-project contamination.
7
7
  metadata:
8
8
  stage: core
9
- version: "7.0"
10
- replaces: "v6.4"
9
+ version: "7.1"
10
+ replaces: "v7.0"
11
11
  requires: symphony-orchestrator
12
12
  tags: [session, restore, context, symphony, neuralmemory, silent, multi-project]
13
13
  trigger: session_start
@@ -99,6 +99,16 @@ Hoặc nếu dùng cấu trúc brain khác:
99
99
  cat CODEBASE.md 2>/dev/null | head -5
100
100
  ```
101
101
 
102
+ #### 3d. Legacy Artifact Detection (v7.1)
103
+ ```bash
104
+ # Detect stale JSON task files — Symphony uses SQLite only
105
+ test -f .symphony/tasks.json && echo "LEGACY_TASKS_JSON_FOUND" || echo "CLEAN"
106
+ ```
107
+
108
+ Nếu phát hiện `LEGACY_TASKS_JSON_FOUND`:
109
+ → Ghi vào silent context: `legacy_artifacts: ["tasks.json"]`
110
+ → `symphony-enforcer` Step 0.5 sẽ warn user.
111
+
102
112
  #### 3c. Symphony Task State
103
113
  ```bash
104
114
  symphony task list -P <projectId> -s in_progress --json 2>/dev/null
@@ -131,21 +131,24 @@ Trước khi bắt đầu, LUÔN:
131
131
  ### Phase 2: Idea Exploration (One Question at a Time)
132
132
 
133
133
  **Rules:**
134
- - Hỏi **một câu hỏi mỗi lần** — không overwhelm user
134
+ - Hỏi **một câu hỏi mỗi lần** — không overwhelm user.
135
+ - **CHỦ ĐỘNG KHAI THÁC & MỞ RỘNG:** Thay vì chỉ nhận ý tưởng thụ động, AI cần **chủ động đặt câu hỏi gợi mở, giả định tình huống hoặc các edge cases** để giúp user tự suy nghĩ sâu hơn và mở rộng ý tưởng của họ (Socratic questioning).
135
136
  - Dùng câu hỏi mở đầu thân thiện:
136
137
 
137
138
  ```
138
- "💡 Kể em nghe ý tưởng của anh đi! Anh muốn làm gì?"
139
+ "💡 Kể em nghe chi tiết ý tưởng của anh đi! Anh đang muốn giải quyết bài toán gì?"
139
140
 
140
- Sau khi nghe, hỏi thêm:
141
- • "App/tính năng này giải quyết vấn đề gì?"
142
- • "Ai sẽ dùng nó?"
143
- • "Anh nghĩ điều làm cho khác biệt?"
141
+ Sau khi nghe, hãy chủ động probe sâu hơn. Thay vì hỏi chung chung, hãy hỏi cụ thể dựa trên ý tưởng của user:
142
+ • "Nếu user làm [hành động X], hệ thống nên xử lý thế nào?"
143
+ • "Điểm khác biệt lớn nhất giữa app của anh và các app hiện có là gì?"
144
+ • "Ai sẽ người dùng cốt lõi nhất, và họ gặp pain point gì nghiêm trọng nhất?"
145
+ • "Anh có nghĩ đến việc thêm [Gợi ý góc nhìn mới/tính năng mở rộng] không, vì nó sẽ giúp [lợi ích]?"
144
146
  ```
145
147
 
146
- **Active Listening:**
148
+ **Active Listening & Expanding:**
147
149
  - Tóm tắt lại: "Em hiểu là anh muốn [X] để giải quyết [Y], đúng không?"
148
- - KHÔNG vội đưa ra giải pháp hiểu vấn đề trước
150
+ - **Đào sâu:** "Em thấy phần [Z] khá thú vị, anh định triển khai nó theo hướng manual hay chạy auto?"
151
+ - KHÔNG vội đưa ra giải pháp hoàn chỉnh — hãy giúp user tự làm rõ ý tưởng của mình trước.
149
152
 
150
153
  ---
151
154
 
@@ -24,47 +24,35 @@ Review early, review often. Catch issues before they cascade.
24
24
  - Before refactoring (baseline check)
25
25
  - After fixing complex bug
26
26
 
27
- ## The Review Process
27
+ ## The Review Process (Execution via Codex CLI)
28
28
 
29
- ### Step 1: Prepare Context
29
+ Thay tự đọc diff và đánh giá, Antigravity **BẮT BUỘC** gọi `codex` CLI để thực hiện Code Review nhằm mở rộng Context Window và sử dụng subagent chuyên dụng.
30
30
 
31
- Gather what the reviewer needs:
31
+ 3 chế độ review chính tùy theo bối cảnh:
32
32
 
33
+ ### 1. Review Toàn Bộ Codebase (Full Review)
34
+ Sử dụng khi cần đánh giá tổng thể dự án, review architecture, security, hoặc chuẩn bị big release.
33
35
  ```bash
34
- # Get the diff scope
35
- git diff main..HEAD --stat
36
- git log main..HEAD --oneline
37
-
38
- # OR for specific task
39
- git diff HEAD~1..HEAD --stat
36
+ codex -p "Review toàn bộ codebase. Tập trung kiểm tra tính nhất quán kiến trúc (architecture), rủi ro bảo mật (security) và hiệu suất (performance)." --approval-mode auto
40
37
  ```
41
38
 
42
- ### Step 2: Construct Review Request
43
-
44
- Every review request needs:
45
-
46
- | Field | Description | Example |
47
- |-------|-------------|---------|
48
- | **WHAT** | What was implemented | "Water reminder notification system" |
49
- | **SPEC** | What it should do | "Send notification every 2h between 8am-10pm" |
50
- | **FILES** | Changed files | `WaterReminderManager.swift`, `NotificationService.swift` |
51
- | **SCOPE** | Review focus | "Logic correctness + thread safety" |
52
-
53
- ### Step 3: Classify Findings
54
-
55
- | Severity | Action | Example |
56
- |----------|--------|---------|
57
- | 🔴 **Critical** | BLOCK — fix immediately | Thread-unsafe shared state, data loss risk |
58
- | 🟡 **Important** | Fix before proceeding | Missing error handling, incomplete validation |
59
- | 🟢 **Minor** | Note for later | Naming convention, code style preference |
60
- | ℹ️ **Suggestion** | Consider but optional | Performance optimization, alternative approach |
39
+ ### 2. Review Những Thay Đổi (Changes / Diff Review)
40
+ Sử dụng khi vừa hoàn thành xong code một tính năng hoặc fix bug (các thay đổi workspace, stashed, unstaged, hoặc dải diff ngắn).
41
+ ```bash
42
+ codex -p "Review những thay đổi hiện tại (git diff/staged). Tập trung kiểm tra logic, edge cases và conventions." --approval-mode auto
43
+ ```
61
44
 
62
- ### Step 4: Act on Feedback
45
+ ### 3. Review Commit Cụ Thể (Specific Commit)
46
+ Sử dụng khi cần review một nhánh git, PR, hoặc một commit hash cụ thể.
47
+ ```bash
48
+ codex -p "Review commit <commit_hash> (hoặc range main..HEAD). Tập trung đánh giá xem code có giải quyết đúng vấn đề và compliance với Spec không." --approval-mode auto
49
+ ```
63
50
 
64
- 1. Fix 🔴 Critical issues IMMEDIATELY
65
- 2. Fix 🟡 Important issues before proceeding to next task
66
- 3. Log 🟢 Minor issues fix in refactoring pass
67
- 4. Evaluate ℹ️ Suggestions adopt if clear improvement
51
+ ### Cách Xử Output Từ Codex
52
+ 1. Fix 🔴 **Critical** issues NGAY LẬP TỨC.
53
+ 2. Fix 🟡 **Important** issues trước khi kết thúc task hoặc chuyển sang Phase mới.
54
+ 3. Log 🟢 **Minor** issues để cấu trúc lại sau.
55
+ 4. Proceed nếu Subagent Codex báo "LGTM" hoặc không có issue nào nghiêm trọng.
68
56
 
69
57
  ## Two-Stage Review (Subagent-Driven)
70
58
 
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: gitnexus-cli
3
+ description: "Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki, or list indexed repos. Examples: \"Index this repo\", \"Reanalyze the codebase\", \"Generate a wiki\""
4
+ ---
5
+
6
+ # GitNexus CLI Commands
7
+
8
+ All commands work via `npx` — no global install required.
9
+
10
+ ## Commands
11
+
12
+ ### analyze — Build or refresh the index
13
+
14
+ ```bash
15
+ npx gitnexus analyze
16
+ ```
17
+
18
+ Run from the project root. This parses all source files, builds the knowledge graph, writes it to `.gitnexus/`, and generates CLAUDE.md / AGENTS.md context files.
19
+
20
+ | Flag | Effect |
21
+ | -------------- | ---------------------------------------------------------------- |
22
+ | `--force` | Force full re-index even if up to date |
23
+ | `--embeddings` | Enable embedding generation for semantic search (off by default) |
24
+
25
+ **When to run:** First time in a project, after major code changes, or when `gitnexus://repo/{name}/context` reports the index is stale. In Claude Code, a PostToolUse hook runs `analyze` automatically after `git commit` and `git merge`, preserving embeddings if previously generated.
26
+
27
+ ### status — Check index freshness
28
+
29
+ ```bash
30
+ npx gitnexus status
31
+ ```
32
+
33
+ Shows whether the current repo has a GitNexus index, when it was last updated, and symbol/relationship counts. Use this to check if re-indexing is needed.
34
+
35
+ ### clean — Delete the index
36
+
37
+ ```bash
38
+ npx gitnexus clean
39
+ ```
40
+
41
+ Deletes the `.gitnexus/` directory and unregisters the repo from the global registry. Use before re-indexing if the index is corrupt or after removing GitNexus from a project.
42
+
43
+ | Flag | Effect |
44
+ | --------- | ------------------------------------------------- |
45
+ | `--force` | Skip confirmation prompt |
46
+ | `--all` | Clean all indexed repos, not just the current one |
47
+
48
+ ### wiki — Generate documentation from the graph
49
+
50
+ ```bash
51
+ npx gitnexus wiki
52
+ ```
53
+
54
+ Generates repository documentation from the knowledge graph using an LLM. Requires an API key (saved to `~/.gitnexus/config.json` on first use).
55
+
56
+ | Flag | Effect |
57
+ | ------------------- | ----------------------------------------- |
58
+ | `--force` | Force full regeneration |
59
+ | `--model <model>` | LLM model (default: minimax/minimax-m2.5) |
60
+ | `--base-url <url>` | LLM API base URL |
61
+ | `--api-key <key>` | LLM API key |
62
+ | `--concurrency <n>` | Parallel LLM calls (default: 3) |
63
+ | `--gist` | Publish wiki as a public GitHub Gist |
64
+
65
+ ### list — Show all indexed repos
66
+
67
+ ```bash
68
+ npx gitnexus list
69
+ ```
70
+
71
+ Lists all repositories registered in `~/.gitnexus/registry.json`. The MCP `list_repos` tool provides the same information.
72
+
73
+ ## After Indexing
74
+
75
+ 1. **Read `gitnexus://repo/{name}/context`** to verify the index loaded
76
+ 2. Use the other GitNexus skills (`exploring`, `debugging`, `impact-analysis`, `refactoring`) for your task
77
+
78
+ ## Troubleshooting
79
+
80
+ - **"Not inside a git repository"**: Run from a directory inside a git repo
81
+ - **Index is stale after re-analyzing**: Restart Claude Code to reload the MCP server
82
+ - **Embeddings slow**: Omit `--embeddings` (it's off by default) or set `OPENAI_API_KEY` for faster API-based embedding
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: gitnexus-debugging
3
+ description: "Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: \"Why is X failing?\", \"Where does this error come from?\", \"Trace this bug\""
4
+ ---
5
+
6
+ # Debugging with GitNexus
7
+
8
+ ## When to Use
9
+
10
+ - "Why is this function failing?"
11
+ - "Trace where this error comes from"
12
+ - "Who calls this method?"
13
+ - "This endpoint returns 500"
14
+ - Investigating bugs, errors, or unexpected behavior
15
+
16
+ ## Workflow
17
+
18
+ ```
19
+ 1. gitnexus_query({query: "<error or symptom>"}) → Find related execution flows
20
+ 2. gitnexus_context({name: "<suspect>"}) → See callers/callees/processes
21
+ 3. READ gitnexus://repo/{name}/process/{name} → Trace execution flow
22
+ 4. gitnexus_cypher({query: "MATCH path..."}) → Custom traces if needed
23
+ ```
24
+
25
+ > If "Index is stale" → run `npx gitnexus analyze` in terminal.
26
+
27
+ ## Checklist
28
+
29
+ ```
30
+ - [ ] Understand the symptom (error message, unexpected behavior)
31
+ - [ ] gitnexus_query for error text or related code
32
+ - [ ] Identify the suspect function from returned processes
33
+ - [ ] gitnexus_context to see callers and callees
34
+ - [ ] Trace execution flow via process resource if applicable
35
+ - [ ] gitnexus_cypher for custom call chain traces if needed
36
+ - [ ] Read source files to confirm root cause
37
+ ```
38
+
39
+ ## Debugging Patterns
40
+
41
+ | Symptom | GitNexus Approach |
42
+ | -------------------- | ---------------------------------------------------------- |
43
+ | Error message | `gitnexus_query` for error text → `context` on throw sites |
44
+ | Wrong return value | `context` on the function → trace callees for data flow |
45
+ | Intermittent failure | `context` → look for external calls, async deps |
46
+ | Performance issue | `context` → find symbols with many callers (hot paths) |
47
+ | Recent regression | `detect_changes` to see what your changes affect |
48
+
49
+ ## Tools
50
+
51
+ **gitnexus_query** — find code related to error:
52
+
53
+ ```
54
+ gitnexus_query({query: "payment validation error"})
55
+ → Processes: CheckoutFlow, ErrorHandling
56
+ → Symbols: validatePayment, handlePaymentError, PaymentException
57
+ ```
58
+
59
+ **gitnexus_context** — full context for a suspect:
60
+
61
+ ```
62
+ gitnexus_context({name: "validatePayment"})
63
+ → Incoming calls: processCheckout, webhookHandler
64
+ → Outgoing calls: verifyCard, fetchRates (external API!)
65
+ → Processes: CheckoutFlow (step 3/7)
66
+ ```
67
+
68
+ **gitnexus_cypher** — custom call chain traces:
69
+
70
+ ```cypher
71
+ MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"})
72
+ RETURN [n IN nodes(path) | n.name] AS chain
73
+ ```
74
+
75
+ ## Example: "Payment endpoint returns 500 intermittently"
76
+
77
+ ```
78
+ 1. gitnexus_query({query: "payment error handling"})
79
+ → Processes: CheckoutFlow, ErrorHandling
80
+ → Symbols: validatePayment, handlePaymentError
81
+
82
+ 2. gitnexus_context({name: "validatePayment"})
83
+ → Outgoing calls: verifyCard, fetchRates (external API!)
84
+
85
+ 3. READ gitnexus://repo/my-app/process/CheckoutFlow
86
+ → Step 3: validatePayment → calls fetchRates (external)
87
+
88
+ 4. Root cause: fetchRates calls external API without proper timeout
89
+ ```
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: gitnexus-exploring
3
+ description: "Use when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase. Examples: \"How does X work?\", \"What calls this function?\", \"Show me the auth flow\""
4
+ ---
5
+
6
+ # Exploring Codebases with GitNexus
7
+
8
+ ## When to Use
9
+
10
+ - "How does authentication work?"
11
+ - "What's the project structure?"
12
+ - "Show me the main components"
13
+ - "Where is the database logic?"
14
+ - Understanding code you haven't seen before
15
+
16
+ ## Workflow
17
+
18
+ ```
19
+ 1. READ gitnexus://repos → Discover indexed repos
20
+ 2. READ gitnexus://repo/{name}/context → Codebase overview, check staleness
21
+ 3. gitnexus_query({query: "<what you want to understand>"}) → Find related execution flows
22
+ 4. gitnexus_context({name: "<symbol>"}) → Deep dive on specific symbol
23
+ 5. READ gitnexus://repo/{name}/process/{name} → Trace full execution flow
24
+ ```
25
+
26
+ > If step 2 says "Index is stale" → run `npx gitnexus analyze` in terminal.
27
+
28
+ ## Checklist
29
+
30
+ ```
31
+ - [ ] READ gitnexus://repo/{name}/context
32
+ - [ ] gitnexus_query for the concept you want to understand
33
+ - [ ] Review returned processes (execution flows)
34
+ - [ ] gitnexus_context on key symbols for callers/callees
35
+ - [ ] READ process resource for full execution traces
36
+ - [ ] Read source files for implementation details
37
+ ```
38
+
39
+ ## Resources
40
+
41
+ | Resource | What you get |
42
+ | --------------------------------------- | ------------------------------------------------------- |
43
+ | `gitnexus://repo/{name}/context` | Stats, staleness warning (~150 tokens) |
44
+ | `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores (~300 tokens) |
45
+ | `gitnexus://repo/{name}/cluster/{name}` | Area members with file paths (~500 tokens) |
46
+ | `gitnexus://repo/{name}/process/{name}` | Step-by-step execution trace (~200 tokens) |
47
+
48
+ ## Tools
49
+
50
+ **gitnexus_query** — find execution flows related to a concept:
51
+
52
+ ```
53
+ gitnexus_query({query: "payment processing"})
54
+ → Processes: CheckoutFlow, RefundFlow, WebhookHandler
55
+ → Symbols grouped by flow with file locations
56
+ ```
57
+
58
+ **gitnexus_context** — 360-degree view of a symbol:
59
+
60
+ ```
61
+ gitnexus_context({name: "validateUser"})
62
+ → Incoming calls: loginHandler, apiMiddleware
63
+ → Outgoing calls: checkToken, getUserById
64
+ → Processes: LoginFlow (step 2/5), TokenRefresh (step 1/3)
65
+ ```
66
+
67
+ ## Example: "How does payment processing work?"
68
+
69
+ ```
70
+ 1. READ gitnexus://repo/my-app/context → 918 symbols, 45 processes
71
+ 2. gitnexus_query({query: "payment processing"})
72
+ → CheckoutFlow: processPayment → validateCard → chargeStripe
73
+ → RefundFlow: initiateRefund → calculateRefund → processRefund
74
+ 3. gitnexus_context({name: "processPayment"})
75
+ → Incoming: checkoutHandler, webhookHandler
76
+ → Outgoing: validateCard, chargeStripe, saveTransaction
77
+ 4. Read src/payments/processor.ts for implementation details
78
+ ```
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: gitnexus-guide
3
+ description: "Use when the user asks about GitNexus itself — available tools, how to query the knowledge graph, MCP resources, graph schema, or workflow reference. Examples: \"What GitNexus tools are available?\", \"How do I use GitNexus?\""
4
+ ---
5
+
6
+ # GitNexus Guide
7
+
8
+ Quick reference for all GitNexus MCP tools, resources, and the knowledge graph schema.
9
+
10
+ ## Always Start Here
11
+
12
+ For any task involving code understanding, debugging, impact analysis, or refactoring:
13
+
14
+ 1. **Read `gitnexus://repo/{name}/context`** — codebase overview + check index freshness
15
+ 2. **Match your task to a skill below** and **read that skill file**
16
+ 3. **Follow the skill's workflow and checklist**
17
+
18
+ > If step 1 warns the index is stale, run `npx gitnexus analyze` in the terminal first.
19
+
20
+ ## Skills
21
+
22
+ | Task | Skill to read |
23
+ | -------------------------------------------- | ------------------- |
24
+ | Understand architecture / "How does X work?" | `gitnexus-exploring` |
25
+ | Blast radius / "What breaks if I change X?" | `gitnexus-impact-analysis` |
26
+ | Trace bugs / "Why is X failing?" | `gitnexus-debugging` |
27
+ | Rename / extract / split / refactor | `gitnexus-refactoring` |
28
+ | Tools, resources, schema reference | `gitnexus-guide` (this file) |
29
+ | Index, status, clean, wiki CLI commands | `gitnexus-cli` |
30
+
31
+ ## Tools Reference
32
+
33
+ | Tool | What it gives you |
34
+ | ---------------- | ------------------------------------------------------------------------ |
35
+ | `query` | Process-grouped code intelligence — execution flows related to a concept |
36
+ | `context` | 360-degree symbol view — categorized refs, processes it participates in |
37
+ | `impact` | Symbol blast radius — what breaks at depth 1/2/3 with confidence |
38
+ | `detect_changes` | Git-diff impact — what do your current changes affect |
39
+ | `rename` | Multi-file coordinated rename with confidence-tagged edits |
40
+ | `cypher` | Raw graph queries (read `gitnexus://repo/{name}/schema` first) |
41
+ | `list_repos` | Discover indexed repos |
42
+
43
+ ## Resources Reference
44
+
45
+ Lightweight reads (~100-500 tokens) for navigation:
46
+
47
+ | Resource | Content |
48
+ | ---------------------------------------------- | ----------------------------------------- |
49
+ | `gitnexus://repo/{name}/context` | Stats, staleness check |
50
+ | `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores |
51
+ | `gitnexus://repo/{name}/cluster/{clusterName}` | Area members |
52
+ | `gitnexus://repo/{name}/processes` | All execution flows |
53
+ | `gitnexus://repo/{name}/process/{processName}` | Step-by-step trace |
54
+ | `gitnexus://repo/{name}/schema` | Graph schema for Cypher |
55
+
56
+ ## Graph Schema
57
+
58
+ **Nodes:** File, Function, Class, Interface, Method, Community, Process
59
+ **Edges (via CodeRelation.type):** CALLS, IMPORTS, EXTENDS, IMPLEMENTS, DEFINES, MEMBER_OF, STEP_IN_PROCESS
60
+
61
+ ```cypher
62
+ MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "myFunc"})
63
+ RETURN caller.name, caller.filePath
64
+ ```