@mrtrinhvn/ag-kit 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +30 -0
  2. package/bin/cli.js +13 -3
  3. package/package.json +1 -1
  4. package/template/.agent/.shared/ui-ux-pro-max/data/charts.csv +26 -0
  5. package/template/.agent/.shared/ui-ux-pro-max/data/colors.csv +97 -0
  6. package/template/.agent/.shared/ui-ux-pro-max/data/icons.csv +101 -0
  7. package/template/.agent/.shared/ui-ux-pro-max/data/landing.csv +31 -0
  8. package/template/.agent/.shared/ui-ux-pro-max/data/products.csv +97 -0
  9. package/template/.agent/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
  10. package/template/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +45 -0
  11. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  12. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  13. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  14. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  15. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  16. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  17. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  18. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
  19. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  20. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  21. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  22. package/template/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  23. package/template/.agent/.shared/ui-ux-pro-max/data/styles.csv +59 -0
  24. package/template/.agent/.shared/ui-ux-pro-max/data/typography.csv +58 -0
  25. package/template/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  26. package/template/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  27. package/template/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +31 -0
  28. package/template/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  29. package/template/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  30. package/template/.agent/.shared/ui-ux-pro-max/scripts/core.py +258 -0
  31. package/template/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +1067 -0
  32. package/template/.agent/.shared/ui-ux-pro-max/scripts/search.py +106 -0
  33. package/template/.agent/ARCHITECTURE.md +288 -0
  34. package/template/.agent/knowledge/orchestrator_v3_protocol.md +60 -0
  35. package/template/.agent/knowledge/self_healing_logs.md +22 -0
  36. package/template/.agent/mcp_config.json +24 -0
  37. package/template/.agent/rules/GEMINI.md +1 -1
  38. package/template/.agent/skills/nextjs-react-expert/9-cache-components.md +103 -0
  39. package/template/.agent/skills/rust-pro/SKILL.md +176 -0
  40. package/template/.agent/skills/telegram-agentic-gateway/SKILL.md +80 -0
  41. package/template/.agent/skills/vfs-assistant/SKILL.md +39 -0
  42. package/LICENSE +0 -21
  43. package/template/.agent/skills/regent-orchestrator/SKILL.md +0 -31
  44. package/template/.agent/skills/telegram-bridge/SKILL.md +0 -30
@@ -0,0 +1,106 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ """
4
+ UI/UX Pro Max Search - BM25 search engine for UI/UX style guides
5
+ Usage: python search.py "<query>" [--domain <domain>] [--stack <stack>] [--max-results 3]
6
+ python search.py "<query>" --design-system [-p "Project Name"]
7
+ python search.py "<query>" --design-system --persist [-p "Project Name"] [--page "dashboard"]
8
+
9
+ Domains: style, prompt, color, chart, landing, product, ux, typography
10
+ Stacks: html-tailwind, react, nextjs
11
+
12
+ Persistence (Master + Overrides pattern):
13
+ --persist Save design system to design-system/MASTER.md
14
+ --page Also create a page-specific override file in design-system/pages/
15
+ """
16
+
17
+ import argparse
18
+ from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, search_stack
19
+ from design_system import generate_design_system, persist_design_system
20
+
21
+
22
+ def format_output(result):
23
+ """Format results for Claude consumption (token-optimized)"""
24
+ if "error" in result:
25
+ return f"Error: {result['error']}"
26
+
27
+ output = []
28
+ if result.get("stack"):
29
+ output.append(f"## UI Pro Max Stack Guidelines")
30
+ output.append(f"**Stack:** {result['stack']} | **Query:** {result['query']}")
31
+ else:
32
+ output.append(f"## UI Pro Max Search Results")
33
+ output.append(f"**Domain:** {result['domain']} | **Query:** {result['query']}")
34
+ output.append(f"**Source:** {result['file']} | **Found:** {result['count']} results\n")
35
+
36
+ for i, row in enumerate(result['results'], 1):
37
+ output.append(f"### Result {i}")
38
+ for key, value in row.items():
39
+ value_str = str(value)
40
+ if len(value_str) > 300:
41
+ value_str = value_str[:300] + "..."
42
+ output.append(f"- **{key}:** {value_str}")
43
+ output.append("")
44
+
45
+ return "\n".join(output)
46
+
47
+
48
+ if __name__ == "__main__":
49
+ parser = argparse.ArgumentParser(description="UI Pro Max Search")
50
+ parser.add_argument("query", help="Search query")
51
+ parser.add_argument("--domain", "-d", choices=list(CSV_CONFIG.keys()), help="Search domain")
52
+ parser.add_argument("--stack", "-s", choices=AVAILABLE_STACKS, help="Stack-specific search (html-tailwind, react, nextjs)")
53
+ parser.add_argument("--max-results", "-n", type=int, default=MAX_RESULTS, help="Max results (default: 3)")
54
+ parser.add_argument("--json", action="store_true", help="Output as JSON")
55
+ # Design system generation
56
+ parser.add_argument("--design-system", "-ds", action="store_true", help="Generate complete design system recommendation")
57
+ parser.add_argument("--project-name", "-p", type=str, default=None, help="Project name for design system output")
58
+ parser.add_argument("--format", "-f", choices=["ascii", "markdown"], default="ascii", help="Output format for design system")
59
+ # Persistence (Master + Overrides pattern)
60
+ parser.add_argument("--persist", action="store_true", help="Save design system to design-system/MASTER.md (creates hierarchical structure)")
61
+ parser.add_argument("--page", type=str, default=None, help="Create page-specific override file in design-system/pages/")
62
+ parser.add_argument("--output-dir", "-o", type=str, default=None, help="Output directory for persisted files (default: current directory)")
63
+
64
+ args = parser.parse_args()
65
+
66
+ # Design system takes priority
67
+ if args.design_system:
68
+ result = generate_design_system(
69
+ args.query,
70
+ args.project_name,
71
+ args.format,
72
+ persist=args.persist,
73
+ page=args.page,
74
+ output_dir=args.output_dir
75
+ )
76
+ print(result)
77
+
78
+ # Print persistence confirmation
79
+ if args.persist:
80
+ project_slug = args.project_name.lower().replace(' ', '-') if args.project_name else "default"
81
+ print("\n" + "=" * 60)
82
+ print(f"✅ Design system persisted to design-system/{project_slug}/")
83
+ print(f" 📄 design-system/{project_slug}/MASTER.md (Global Source of Truth)")
84
+ if args.page:
85
+ page_filename = args.page.lower().replace(' ', '-')
86
+ print(f" 📄 design-system/{project_slug}/pages/{page_filename}.md (Page Overrides)")
87
+ print("")
88
+ print(f"📖 Usage: When building a page, check design-system/{project_slug}/pages/[page].md first.")
89
+ print(f" If exists, its rules override MASTER.md. Otherwise, use MASTER.md.")
90
+ print("=" * 60)
91
+ # Stack search
92
+ elif args.stack:
93
+ result = search_stack(args.query, args.stack, args.max_results)
94
+ if args.json:
95
+ import json
96
+ print(json.dumps(result, indent=2, ensure_ascii=False))
97
+ else:
98
+ print(format_output(result))
99
+ # Domain search
100
+ else:
101
+ result = search(args.query, args.domain, args.max_results)
102
+ if args.json:
103
+ import json
104
+ print(json.dumps(result, indent=2, ensure_ascii=False))
105
+ else:
106
+ print(format_output(result))
@@ -0,0 +1,288 @@
1
+ # Antigravity Kit Architecture
2
+
3
+ > Comprehensive AI Agent Capability Expansion Toolkit
4
+
5
+ ---
6
+
7
+ ## 📋 Overview
8
+
9
+ Antigravity Kit is a modular system consisting of:
10
+
11
+ - **20 Specialist Agents** - Role-based AI personas
12
+ - **36 Skills** - Domain-specific knowledge modules
13
+ - **11 Workflows** - Slash command procedures
14
+
15
+ ---
16
+
17
+ ## 🏗️ Directory Structure
18
+
19
+ ```plaintext
20
+ .agent/
21
+ ├── ARCHITECTURE.md # This file
22
+ ├── agents/ # 20 Specialist Agents
23
+ ├── skills/ # 36 Skills
24
+ ├── workflows/ # 11 Slash Commands
25
+ ├── rules/ # Global Rules
26
+ └── scripts/ # Master Validation Scripts
27
+ ```
28
+
29
+ ---
30
+
31
+ ## 🤖 Agents (20)
32
+
33
+ Specialist AI personas for different domains.
34
+
35
+ | Agent | Focus | Skills Used |
36
+ | ------------------------ | -------------------------- | -------------------------------------------------------- |
37
+ | `orchestrator` | Multi-agent coordination | parallel-agents, behavioral-modes |
38
+ | `project-planner` | Discovery, task planning | brainstorming, plan-writing, architecture |
39
+ | `frontend-specialist` | Web UI/UX | frontend-design, react-best-practices, tailwind-patterns |
40
+ | `backend-specialist` | API, business logic | api-patterns, nodejs-best-practices, database-design |
41
+ | `database-architect` | Schema, SQL | database-design, prisma-expert |
42
+ | `mobile-developer` | iOS, Android, RN | mobile-design |
43
+ | `game-developer` | Game logic, mechanics | game-development |
44
+ | `devops-engineer` | CI/CD, Docker | deployment-procedures, docker-expert |
45
+ | `security-auditor` | Security compliance | vulnerability-scanner, red-team-tactics |
46
+ | `penetration-tester` | Offensive security | red-team-tactics |
47
+ | `test-engineer` | Testing strategies | testing-patterns, tdd-workflow, webapp-testing |
48
+ | `debugger` | Root cause analysis | systematic-debugging |
49
+ | `performance-optimizer` | Speed, Web Vitals | performance-profiling |
50
+ | `seo-specialist` | Ranking, visibility | seo-fundamentals, geo-fundamentals |
51
+ | `documentation-writer` | Manuals, docs | documentation-templates |
52
+ | `product-manager` | Requirements, user stories | plan-writing, brainstorming |
53
+ | `product-owner` | Strategy, backlog, MVP | plan-writing, brainstorming |
54
+ | `qa-automation-engineer` | E2E testing, CI pipelines | webapp-testing, testing-patterns |
55
+ | `code-archaeologist` | Legacy code, refactoring | clean-code, code-review-checklist |
56
+ | `explorer-agent` | Codebase analysis | - |
57
+
58
+ ---
59
+
60
+ ## 🧩 Skills (36)
61
+
62
+ Modular knowledge domains that agents can load on-demand. based on task context.
63
+
64
+ ### Frontend & UI
65
+
66
+ | Skill | Description |
67
+ | ----------------------- | --------------------------------------------------------------------- |
68
+ | `react-best-practices` | React & Next.js performance optimization (Vercel - 57 rules) |
69
+ | `web-design-guidelines` | Web UI audit - 100+ rules for accessibility, UX, performance (Vercel) |
70
+ | `tailwind-patterns` | Tailwind CSS v4 utilities |
71
+ | `frontend-design` | UI/UX patterns, design systems |
72
+ | `ui-ux-pro-max` | 50 styles, 21 palettes, 50 fonts |
73
+
74
+ ### Backend & API
75
+
76
+ | Skill | Description |
77
+ | ----------------------- | ------------------------------ |
78
+ | `api-patterns` | REST, GraphQL, tRPC |
79
+ | `nestjs-expert` | NestJS modules, DI, decorators |
80
+ | `nodejs-best-practices` | Node.js async, modules |
81
+ | `python-patterns` | Python standards, FastAPI |
82
+
83
+ ### Database
84
+
85
+ | Skill | Description |
86
+ | ----------------- | --------------------------- |
87
+ | `database-design` | Schema design, optimization |
88
+ | `prisma-expert` | Prisma ORM, migrations |
89
+
90
+ ### TypeScript/JavaScript
91
+
92
+ | Skill | Description |
93
+ | ------------------- | ----------------------------------- |
94
+ | `typescript-expert` | Type-level programming, performance |
95
+
96
+ ### Cloud & Infrastructure
97
+
98
+ | Skill | Description |
99
+ | ----------------------- | ------------------------- |
100
+ | `docker-expert` | Containerization, Compose |
101
+ | `deployment-procedures` | CI/CD, deploy workflows |
102
+ | `server-management` | Infrastructure management |
103
+
104
+ ### Testing & Quality
105
+
106
+ | Skill | Description |
107
+ | ----------------------- | ------------------------ |
108
+ | `testing-patterns` | Jest, Vitest, strategies |
109
+ | `webapp-testing` | E2E, Playwright |
110
+ | `tdd-workflow` | Test-driven development |
111
+ | `code-review-checklist` | Code review standards |
112
+ | `lint-and-validate` | Linting, validation |
113
+
114
+ ### Security
115
+
116
+ | Skill | Description |
117
+ | ----------------------- | ------------------------ |
118
+ | `vulnerability-scanner` | Security auditing, OWASP |
119
+ | `red-team-tactics` | Offensive security |
120
+
121
+ ### Architecture & Planning
122
+
123
+ | Skill | Description |
124
+ | --------------- | -------------------------- |
125
+ | `app-builder` | Full-stack app scaffolding |
126
+ | `architecture` | System design patterns |
127
+ | `plan-writing` | Task planning, breakdown |
128
+ | `brainstorming` | Socratic questioning |
129
+
130
+ ### Mobile
131
+
132
+ | Skill | Description |
133
+ | --------------- | --------------------- |
134
+ | `mobile-design` | Mobile UI/UX patterns |
135
+
136
+ ### Game Development
137
+
138
+ | Skill | Description |
139
+ | ------------------ | --------------------- |
140
+ | `game-development` | Game logic, mechanics |
141
+
142
+ ### SEO & Growth
143
+
144
+ | Skill | Description |
145
+ | ------------------ | ----------------------------- |
146
+ | `seo-fundamentals` | SEO, E-E-A-T, Core Web Vitals |
147
+ | `geo-fundamentals` | GenAI optimization |
148
+
149
+ ### Shell/CLI
150
+
151
+ | Skill | Description |
152
+ | -------------------- | ------------------------- |
153
+ | `bash-linux` | Linux commands, scripting |
154
+ | `powershell-windows` | Windows PowerShell |
155
+
156
+ ### Other
157
+
158
+ | Skill | Description |
159
+ | ------------------------- | ------------------------- |
160
+ | `clean-code` | Coding standards (Global) |
161
+ | `behavioral-modes` | Agent personas |
162
+ | `parallel-agents` | Multi-agent patterns |
163
+ | `mcp-builder` | Model Context Protocol |
164
+ | `documentation-templates` | Doc formats |
165
+ | `i18n-localization` | Internationalization |
166
+ | `performance-profiling` | Web Vitals, optimization |
167
+ | `systematic-debugging` | Troubleshooting |
168
+
169
+ ---
170
+
171
+ ## 🔄 Workflows (11)
172
+
173
+ Slash command procedures. Invoke with `/command`.
174
+
175
+ | Command | Description |
176
+ | ---------------- | ------------------------ |
177
+ | `/brainstorm` | Socratic discovery |
178
+ | `/create` | Create new features |
179
+ | `/debug` | Debug issues |
180
+ | `/deploy` | Deploy application |
181
+ | `/enhance` | Improve existing code |
182
+ | `/orchestrate` | Multi-agent coordination |
183
+ | `/plan` | Task breakdown |
184
+ | `/preview` | Preview changes |
185
+ | `/status` | Check project status |
186
+ | `/test` | Run tests |
187
+ | `/ui-ux-pro-max` | Design with 50 styles |
188
+
189
+ ---
190
+
191
+ ## 🎯 Skill Loading Protocol
192
+
193
+ ```plaintext
194
+ User Request → Skill Description Match → Load SKILL.md
195
+
196
+ Read references/
197
+
198
+ Read scripts/
199
+ ```
200
+
201
+ ### Skill Structure
202
+
203
+ ```plaintext
204
+ skill-name/
205
+ ├── SKILL.md # (Required) Metadata & instructions
206
+ ├── scripts/ # (Optional) Python/Bash scripts
207
+ ├── references/ # (Optional) Templates, docs
208
+ └── assets/ # (Optional) Images, logos
209
+ ```
210
+
211
+ ### Enhanced Skills (with scripts/references)
212
+
213
+ | Skill | Files | Coverage |
214
+ | ------------------- | ----- | ----------------------------------- |
215
+ | `ui-ux-pro-max` | 27 | 50 styles, 21 palettes, 50 fonts |
216
+ | `app-builder` | 20 | Full-stack scaffolding |
217
+
218
+ ---
219
+
220
+ ## � Scripts (2)
221
+
222
+ Master validation scripts that orchestrate skill-level scripts.
223
+
224
+ ### Master Scripts
225
+
226
+ | Script | Purpose | When to Use |
227
+ | --------------- | --------------------------------------- | ------------------------ |
228
+ | `checklist.py` | Priority-based validation (Core checks) | Development, pre-commit |
229
+ | `verify_all.py` | Comprehensive verification (All checks) | Pre-deployment, releases |
230
+
231
+ ### Usage
232
+
233
+ ```bash
234
+ # Quick validation during development
235
+ python .agent/scripts/checklist.py .
236
+
237
+ # Full verification before deployment
238
+ python .agent/scripts/verify_all.py . --url http://localhost:3000
239
+ ```
240
+
241
+ ### What They Check
242
+
243
+ **checklist.py** (Core checks):
244
+
245
+ - Security (vulnerabilities, secrets)
246
+ - Code Quality (lint, types)
247
+ - Schema Validation
248
+ - Test Suite
249
+ - UX Audit
250
+ - SEO Check
251
+
252
+ **verify_all.py** (Full suite):
253
+
254
+ - Everything in checklist.py PLUS:
255
+ - Lighthouse (Core Web Vitals)
256
+ - Playwright E2E
257
+ - Bundle Analysis
258
+ - Mobile Audit
259
+ - i18n Check
260
+
261
+ For details, see [scripts/README.md](scripts/README.md)
262
+
263
+ ---
264
+
265
+ ## 📊 Statistics
266
+
267
+ | Metric | Value |
268
+ | ------------------- | ----------------------------- |
269
+ | **Total Agents** | 20 |
270
+ | **Total Skills** | 36 |
271
+ | **Total Workflows** | 11 |
272
+ | **Total Scripts** | 2 (master) + 18 (skill-level) |
273
+ | **Coverage** | ~90% web/mobile development |
274
+
275
+ ---
276
+
277
+ ## 🔗 Quick Reference
278
+
279
+ | Need | Agent | Skills |
280
+ | -------- | --------------------- | ------------------------------------- |
281
+ | Web App | `frontend-specialist` | react-best-practices, frontend-design |
282
+ | API | `backend-specialist` | api-patterns, nodejs-best-practices |
283
+ | Mobile | `mobile-developer` | mobile-design |
284
+ | Database | `database-architect` | database-design, prisma-expert |
285
+ | Security | `security-auditor` | vulnerability-scanner |
286
+ | Testing | `test-engineer` | testing-patterns, webapp-testing |
287
+ | Debug | `debugger` | systematic-debugging |
288
+ | Plan | `project-planner` | brainstorming, plan-writing |
@@ -0,0 +1,60 @@
1
+ # 🧠 Giao Thức Quản Đốc Vô Song (Orchestrator V3 Protocol)
2
+
3
+ Bản thảo này đúc kết toàn bộ kinh nghiệm "xương máu" khi nâng cấp Antigravity Orchestrator lên phiên bản V3 - Một hệ thống nổ máy tự động, có tư duy chiến lược và quyền năng can thiệp trực tiếp vào IDE (God Mode).
4
+
5
+ ---
6
+
7
+ ## 1. Hệ Tư Duy Chiến Lược (Strategic Prompting)
8
+
9
+ Đối với các Model tầm trung (8B - 14B), để tránh việc chúng bị "ngáo quyền năng" hoặc nhại lời Sếp, cần áp dụng cấu trúc Prompt JSON-First sau:
10
+
11
+ ### Quy tắc Vô Song:
12
+ - **Trường `strategy`**: Ép Model phải giải trình chiến lược TRƯỚC khi đưa ra câu trả lời. Điều này giúp AI tự kiểm tra logic của chính mình.
13
+ - **Cây Quyết Định (Decision Tree)**:
14
+ 1. Câu hỏi kiến thức/xã hội -> `reply_user`.
15
+ 2. Task nhẹ/quét file -> `execute_task` (Sandbox).
16
+ 3. Task nặng/sửa code dự án -> `telepathy_inject` (IDE).
17
+
18
+ ### Prompt Mẫu (System Prompt):
19
+ ```markdown
20
+ Bạn là QUẢN ĐỐC - AI Manager của Sếp Tạo.
21
+ Phong thái: Thực quyền, chuyên nghiệp, không nhại lời Sếp.
22
+ Tuyệt đối không xưng tên là Antigravity. Bạn là Quản Đốc của Antigravity.
23
+ ... [Cây quyết định] ...
24
+ ```
25
+
26
+ ---
27
+
28
+ ## 2. Cầu Nối Thần Giao Cách Cảm (Telepathy Bridge)
29
+
30
+ Đây là quyền năng cho phép Orchestrator (chạy trong terminal/telegram) điều khiển trực tiếp IDE Antigravity (GUI) đang mở trên máy Sếp qua giao thức CDP.
31
+
32
+ ### Cấu hình Cổng Cố định (Fixed Port Protocol):
33
+ Để tránh xung đột khi mở nhiều dự án, hãy áp dụng dải cổng chuẩn:
34
+ - **Dự án chính**: Port 9222.
35
+ - **Dự án phụ 1, 2, 3...**: Port 9223, 9224...
36
+ - **Quản Đốc**: Sẽ tự động quét từ 9222 -> 9230 để tìm đúng IDE dựa trên đường dẫn dự án (`target_path`).
37
+
38
+ ### Lệnh khởi động God Mode:
39
+ Sử dụng tham số `--remote-debugging-port=9222` khi mở Antigravity.
40
+
41
+ ---
42
+
43
+ ## 3. Bộ Khởi Động Một Chạm (The telepathy.sh Standard)
44
+
45
+ Để Sếp không phải nhớ lệnh terminal, mọi dự án Antigravity nên có file `telepathy.sh` với nội dung:
46
+ - Kiểm tra cổng bận (tránh mở trùng).
47
+ - Tự động chọn "No" khi hỏi Overwrite `.agent`.
48
+ - Chạy ngầm (`nohup` + `& disown`) để tắt terminal mà IDE vẫn sống.
49
+
50
+ ---
51
+
52
+ ## 4. Tự Phẫu Thuật Code (Self-Healing IDE)
53
+
54
+ Khi Quản Đốc dùng `telepathy_inject`, nó sẽ "bơm" trực tiếp Payload vào Chat Box của IDE.
55
+ - **Ưu điểm**: Sử dụng được toàn bộ sức mạnh của "Mắt Thần" (AutoAccept) trong IDE để sửa code mà không cần Sếp duyệt từng dòng.
56
+ - **Lưu ý**: Sau khi bơm lệnh, Quản Đốc cần dùng lệnh `bash` (git status, rgrep) để kiểm tra xem IDE đã hoàn thành công việc chưa trước khi báo cáo Sếp.
57
+
58
+ ---
59
+
60
+ *Cập nhật lần cuối: 24/03/2026 bởi Antigravity (Quản Đốc Vô Song)*
@@ -0,0 +1,22 @@
1
+
2
+ ## [2026-03-23T15:14:48.328Z] 🚨 Lịch Sử Tự Phẫu Thuật (Self-Heal)
3
+ - **Bác sĩ Trực:** hf.co/bartowski/nvidia_Orchestrator-8B-GGUF:Q4_K_M
4
+ - **Nạn nhân:** `BrokenMathTool.ts`
5
+ - **Thông báo Bệnh (Triệu chứng):**
6
+ ```
7
+ TypeError: FATAL EXHAUSTION: Cannot add numbers because the quantum capacitor is uncalibrated, and the math core structure is completely broken and fundamentally flawed.
8
+ at Function.add (/home/tao/Projects/ag-orchestrator/src/tools/BrokenMathTool.ts:7:11)
9
+ at runTest (/home/tao/Projects/ag-orchestrator/scripts/test_mini_antigravity.ts:12:35)
10
+ ```
11
+ - **Kết quả:** Code đột biến vượt qua Sandbox, Hot-Reload thành công, đã lưu Git Backup.
12
+
13
+ ## [2026-03-23T15:22:20.904Z] 🚨 Lịch Sử Tự Phẫu Thuật (Self-Heal)
14
+ - **Bác sĩ Trực:** hf.co/bartowski/nvidia_Orchestrator-8B-GGUF:Q4_K_M
15
+ - **Nạn nhân:** `BrokenMathTool.ts`
16
+ - **Thông báo Bệnh (Triệu chứng):**
17
+ ```
18
+ TypeError: FATAL CRASH: I forgot how to add numbers. The system structure is damaged.
19
+ at Function.add (/home/tao/Projects/ag-orchestrator/src/tools/BrokenMathTool.ts:3:11)
20
+ at runTest (/home/tao/Projects/ag-orchestrator/scripts/test_mini_antigravity.ts:12:35)
21
+ ```
22
+ - **Kết quả:** Code đột biến vượt qua Sandbox, Hot-Reload thành công, đã lưu Git Backup.
@@ -0,0 +1,24 @@
1
+ {
2
+ "mcpServers": {
3
+ "context7": {
4
+ "command": "npx",
5
+ "args": [
6
+ "-y",
7
+ "@upstash/context7-mcp",
8
+ "--api-key",
9
+ "YOUR_API_KEY"
10
+ ]
11
+ },
12
+ "shadcn": {
13
+ "command": "npx",
14
+ "args": [
15
+ "shadcn@latest",
16
+ "mcp"
17
+ ]
18
+ }
19
+ //other mcp servers
20
+ }
21
+ }
22
+
23
+ // setup mcp server in ~/.gemini\antigravity\mcp_config.json
24
+
@@ -268,7 +268,7 @@ If your code changes affect the architecture, data flow, API payloads, or core l
268
268
  ### Agents & Skills
269
269
 
270
270
  - **Masters**: `orchestrator`, `project-planner`, `security-auditor` (Cyber/Audit), `backend-specialist` (API/DB), `frontend-specialist` (UI/UX), `mobile-developer`, `debugger`, `game-developer`
271
- - **Key Skills**: `clean-code`, `brainstorming`, `app-builder`, `frontend-design`, `mobile-design`, `plan-writing`, `behavioral-modes`, `knowledge-management`, `regent-orchestrator`, `telegram-bridge`
271
+ - **Key Skills**: `clean-code`, `brainstorming`, `app-builder`, `frontend-design`, `mobile-design`, `plan-writing`, `behavioral-modes`, `knowledge-management`
272
272
 
273
273
  ### Key Scripts
274
274
 
@@ -0,0 +1,103 @@
1
+ # Cache Components: `use cache` & `cacheLife`
2
+
3
+ > [!IMPORTANT]
4
+ > This is a Next.js 16+ specific skill. Do NOT apply these patterns to Next.js 15 or earlier without explicitly checking compatibility.
5
+
6
+ ## Core Philosophy
7
+ Next.js 16 marks the transition from "Segment-level caching" to "Component-level caching". We no longer rely on `export const revalidate = 3600`. Instead, we use granular directives and profiles.
8
+
9
+ ## 1. The `use cache` Directive
10
+ The `use cache` directive can be applied to **Server Components** or **Functions**.
11
+
12
+ ### Rule: Granular Application
13
+ Wrap only the data-fetching logic or the specific component that needs caching.
14
+
15
+ ```tsx
16
+ // Good: Granular function caching
17
+ async function getProduct(id: string) {
18
+ 'use cache'
19
+ return await db.product.findUnique({ where: { id } })
20
+ }
21
+
22
+ // Good: Component-level caching
23
+ export default async function ProductCard({ id }: { id: string }) {
24
+ 'use cache'
25
+ const product = await getProduct(id)
26
+ return <div>{product.name}</div>
27
+ }
28
+ ```
29
+
30
+ ## 2. Using `cacheLife`
31
+ `cacheLife` defines the "Freshness" and "Staleness" of a cached item using pre-defined or custom profiles.
32
+
33
+ ### Usage Pattern
34
+ ```tsx
35
+ import { cacheLife } from 'next/cache'
36
+
37
+ async function getStockInfo() {
38
+ 'use cache'
39
+ cacheLife('minutes') // Using a pre-defined profile
40
+ return await fetchStocks()
41
+ }
42
+ ```
43
+
44
+ ### Profile Reference
45
+ - `default`: Base profile (1 year stale time).
46
+ - `seconds`: High-frequency updates.
47
+ - `minutes`: Standard dynamic content.
48
+ - `hours`: Stable content (e.g., blog posts).
49
+ - `days`: Semi-static content.
50
+ - `weeks`: Static-like content.
51
+ - `max`: Permanent cache until invalidated.
52
+
53
+ ## 3. On-Demand Invalidation with `cacheTag`
54
+ `cacheTag` allows you to label cached data for selective purging.
55
+
56
+ ### Implementation
57
+ ```tsx
58
+ import { cacheTag } from 'next/cache'
59
+
60
+ async function getProfile(user: string) {
61
+ 'use cache'
62
+ cacheTag(`profile-${user}`)
63
+ return await db.user.findUnique(...)
64
+ }
65
+ ```
66
+
67
+ ### Revalidation
68
+ In a Server Action:
69
+ ```tsx
70
+ import { revalidateTag, updateTag } from 'next/cache'
71
+
72
+ export async function updateProfile(user: string, data: any) {
73
+ await db.user.update(...)
74
+
75
+ // Choice A: Background revalidation (Stale-While-Revalidate)
76
+ revalidateTag(`profile-${user}`)
77
+
78
+ // Choice B: Immediate "Read-Your-Writes" update
79
+ updateTag(`profile-${user}`)
80
+ }
81
+ ```
82
+
83
+ ## 4. Partial Pre-Rendering (PPR)
84
+ Next.js 16 stabilizes PPR via the `cacheComponents` flag in `next.config.ts`.
85
+
86
+ ### Pattern: Suspense Boundaries
87
+ Always wrap dynamic "Cache Components" in `<Suspense>` to enable PPR.
88
+
89
+ ```tsx
90
+ import { Suspense } from 'react'
91
+ import { Skeleton } from '@/components/ui/skeleton'
92
+
93
+ export default function Page() {
94
+ return (
95
+ <main>
96
+ <h1>Static Header</h1>
97
+ <Suspense fallback={<Skeleton />}>
98
+ <DynamicCacheComponent />
99
+ </Suspense>
100
+ </main>
101
+ )
102
+ }
103
+ ```