@mrtrinhvn/ag-kit 1.0.10 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/bin/cli.js +62 -0
  4. package/package.json +7 -1
  5. package/template/.agent/rules/GEMINI.md +1 -1
  6. package/template/.agent/skills/regent-orchestrator/SKILL.md +31 -0
  7. package/template/.agent/skills/telegram-bridge/SKILL.md +30 -0
  8. package/.agent/.shared/ui-ux-pro-max/data/charts.csv +0 -26
  9. package/.agent/.shared/ui-ux-pro-max/data/colors.csv +0 -97
  10. package/.agent/.shared/ui-ux-pro-max/data/icons.csv +0 -101
  11. package/.agent/.shared/ui-ux-pro-max/data/landing.csv +0 -31
  12. package/.agent/.shared/ui-ux-pro-max/data/products.csv +0 -97
  13. package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +0 -24
  14. package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +0 -45
  15. package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +0 -53
  16. package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +0 -56
  17. package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +0 -53
  18. package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +0 -53
  19. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +0 -51
  20. package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +0 -59
  21. package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +0 -52
  22. package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +0 -54
  23. package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +0 -61
  24. package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +0 -54
  25. package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +0 -51
  26. package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +0 -50
  27. package/.agent/.shared/ui-ux-pro-max/data/styles.csv +0 -59
  28. package/.agent/.shared/ui-ux-pro-max/data/typography.csv +0 -58
  29. package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +0 -101
  30. package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +0 -100
  31. package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +0 -31
  32. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  33. package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  34. package/.agent/.shared/ui-ux-pro-max/scripts/core.py +0 -258
  35. package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +0 -1067
  36. package/.agent/.shared/ui-ux-pro-max/scripts/search.py +0 -106
  37. package/.agent/ARCHITECTURE.md +0 -288
  38. package/.agent/agents/backend-specialist.md +0 -263
  39. package/.agent/agents/code-archaeologist.md +0 -106
  40. package/.agent/agents/database-architect.md +0 -226
  41. package/.agent/agents/debugger.md +0 -225
  42. package/.agent/agents/devops-engineer.md +0 -242
  43. package/.agent/agents/documentation-writer.md +0 -104
  44. package/.agent/agents/explorer-agent.md +0 -73
  45. package/.agent/agents/frontend-specialist.md +0 -556
  46. package/.agent/agents/game-developer.md +0 -162
  47. package/.agent/agents/mobile-developer.md +0 -377
  48. package/.agent/agents/orchestrator.md +0 -416
  49. package/.agent/agents/penetration-tester.md +0 -188
  50. package/.agent/agents/performance-optimizer.md +0 -187
  51. package/.agent/agents/product-manager.md +0 -112
  52. package/.agent/agents/product-owner.md +0 -95
  53. package/.agent/agents/project-planner.md +0 -406
  54. package/.agent/agents/qa-automation-engineer.md +0 -103
  55. package/.agent/agents/quant-architect.md +0 -31
  56. package/.agent/agents/security-auditor.md +0 -170
  57. package/.agent/agents/seo-specialist.md +0 -111
  58. package/.agent/agents/test-engineer.md +0 -158
  59. package/.agent/mcp_config.json +0 -24
  60. package/.agent/rules/GEMINI.md +0 -280
  61. package/.agent/scripts/auto_preview.py +0 -148
  62. package/.agent/scripts/checklist.py +0 -217
  63. package/.agent/scripts/session_manager.py +0 -120
  64. package/.agent/scripts/verify_all.py +0 -327
  65. package/.agent/skills/api-patterns/SKILL.md +0 -81
  66. package/.agent/skills/api-patterns/api-style.md +0 -42
  67. package/.agent/skills/api-patterns/auth.md +0 -24
  68. package/.agent/skills/api-patterns/documentation.md +0 -26
  69. package/.agent/skills/api-patterns/graphql.md +0 -41
  70. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  71. package/.agent/skills/api-patterns/response.md +0 -37
  72. package/.agent/skills/api-patterns/rest.md +0 -40
  73. package/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
  74. package/.agent/skills/api-patterns/security-testing.md +0 -122
  75. package/.agent/skills/api-patterns/trpc.md +0 -41
  76. package/.agent/skills/api-patterns/versioning.md +0 -22
  77. package/.agent/skills/app-builder/SKILL.md +0 -75
  78. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  79. package/.agent/skills/app-builder/feature-building.md +0 -53
  80. package/.agent/skills/app-builder/project-detection.md +0 -34
  81. package/.agent/skills/app-builder/scaffolding.md +0 -118
  82. package/.agent/skills/app-builder/tech-stack.md +0 -40
  83. package/.agent/skills/app-builder/templates/SKILL.md +0 -39
  84. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  85. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  86. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  87. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  88. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  89. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  90. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  91. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -82
  92. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -100
  93. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -106
  94. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -101
  95. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  96. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -93
  97. package/.agent/skills/architecture/SKILL.md +0 -55
  98. package/.agent/skills/architecture/context-discovery.md +0 -43
  99. package/.agent/skills/architecture/examples.md +0 -94
  100. package/.agent/skills/architecture/pattern-selection.md +0 -68
  101. package/.agent/skills/architecture/patterns-reference.md +0 -50
  102. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  103. package/.agent/skills/bash-linux/SKILL.md +0 -199
  104. package/.agent/skills/behavioral-modes/SKILL.md +0 -242
  105. package/.agent/skills/brainstorming/SKILL.md +0 -168
  106. package/.agent/skills/brainstorming/dynamic-questioning.md +0 -350
  107. package/.agent/skills/business-ops/SKILL.md +0 -26
  108. package/.agent/skills/clean-code/SKILL.md +0 -202
  109. package/.agent/skills/cli-generator/SKILL.md +0 -48
  110. package/.agent/skills/code-review-checklist/SKILL.md +0 -109
  111. package/.agent/skills/cognitive-session/SKILL.md +0 -28
  112. package/.agent/skills/data-science/SKILL.md +0 -28
  113. package/.agent/skills/database-design/SKILL.md +0 -52
  114. package/.agent/skills/database-design/database-selection.md +0 -43
  115. package/.agent/skills/database-design/indexing.md +0 -39
  116. package/.agent/skills/database-design/migrations.md +0 -48
  117. package/.agent/skills/database-design/optimization.md +0 -36
  118. package/.agent/skills/database-design/orm-selection.md +0 -30
  119. package/.agent/skills/database-design/schema-design.md +0 -56
  120. package/.agent/skills/database-design/scripts/schema_validator.py +0 -172
  121. package/.agent/skills/deployment-procedures/SKILL.md +0 -241
  122. package/.agent/skills/doc.md +0 -177
  123. package/.agent/skills/documentation-templates/SKILL.md +0 -194
  124. package/.agent/skills/frontend-design/SKILL.md +0 -418
  125. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  126. package/.agent/skills/frontend-design/color-system.md +0 -311
  127. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  128. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  129. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +0 -183
  130. package/.agent/skills/frontend-design/scripts/ux_audit.py +0 -722
  131. package/.agent/skills/frontend-design/typography-system.md +0 -345
  132. package/.agent/skills/frontend-design/ux-psychology.md +0 -541
  133. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  134. package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
  135. package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
  136. package/.agent/skills/game-development/SKILL.md +0 -167
  137. package/.agent/skills/game-development/game-art/SKILL.md +0 -185
  138. package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
  139. package/.agent/skills/game-development/game-design/SKILL.md +0 -129
  140. package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
  141. package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
  142. package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
  143. package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
  144. package/.agent/skills/game-development/web-games/SKILL.md +0 -150
  145. package/.agent/skills/geo-fundamentals/SKILL.md +0 -156
  146. package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +0 -289
  147. package/.agent/skills/i18n-localization/SKILL.md +0 -154
  148. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  149. package/.agent/skills/intelligent-routing/SKILL.md +0 -335
  150. package/.agent/skills/knowledge-management/SKILL.md +0 -66
  151. package/.agent/skills/lint-and-validate/SKILL.md +0 -45
  152. package/.agent/skills/lint-and-validate/scripts/lint_runner.py +0 -172
  153. package/.agent/skills/lint-and-validate/scripts/type_coverage.py +0 -173
  154. package/.agent/skills/llm-routing-quirks/SKILL.md +0 -41
  155. package/.agent/skills/mcp-builder/SKILL.md +0 -176
  156. package/.agent/skills/memory-architecture/SKILL.md +0 -107
  157. package/.agent/skills/mini-antigravity-injection/SKILL.md +0 -61
  158. package/.agent/skills/mobile-design/SKILL.md +0 -394
  159. package/.agent/skills/mobile-design/decision-trees.md +0 -516
  160. package/.agent/skills/mobile-design/mobile-backend.md +0 -491
  161. package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
  162. package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
  163. package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
  164. package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
  165. package/.agent/skills/mobile-design/mobile-performance.md +0 -767
  166. package/.agent/skills/mobile-design/mobile-testing.md +0 -356
  167. package/.agent/skills/mobile-design/mobile-typography.md +0 -433
  168. package/.agent/skills/mobile-design/platform-android.md +0 -666
  169. package/.agent/skills/mobile-design/platform-ios.md +0 -561
  170. package/.agent/skills/mobile-design/scripts/mobile_audit.py +0 -670
  171. package/.agent/skills/mobile-design/touch-psychology.md +0 -537
  172. package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  173. package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  174. package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  175. package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  176. package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  177. package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  178. package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  179. package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  180. package/.agent/skills/nextjs-react-expert/9-cache-components.md +0 -103
  181. package/.agent/skills/nextjs-react-expert/SKILL.md +0 -267
  182. package/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
  183. package/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
  184. package/.agent/skills/nodejs-best-practices/SKILL.md +0 -333
  185. package/.agent/skills/parallel-agents/SKILL.md +0 -175
  186. package/.agent/skills/performance-profiling/SKILL.md +0 -143
  187. package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
  188. package/.agent/skills/plan-writing/SKILL.md +0 -153
  189. package/.agent/skills/powershell-windows/SKILL.md +0 -167
  190. package/.agent/skills/product-management/SKILL.md +0 -30
  191. package/.agent/skills/python-patterns/SKILL.md +0 -441
  192. package/.agent/skills/red-team-tactics/SKILL.md +0 -199
  193. package/.agent/skills/rust-pro/SKILL.md +0 -176
  194. package/.agent/skills/seo-fundamentals/SKILL.md +0 -129
  195. package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
  196. package/.agent/skills/server-management/SKILL.md +0 -161
  197. package/.agent/skills/systematic-debugging/SKILL.md +0 -120
  198. package/.agent/skills/tailwind-patterns/SKILL.md +0 -269
  199. package/.agent/skills/tdd-workflow/SKILL.md +0 -148
  200. package/.agent/skills/testing-patterns/SKILL.md +0 -178
  201. package/.agent/skills/testing-patterns/scripts/test_runner.py +0 -219
  202. package/.agent/skills/vulnerability-scanner/SKILL.md +0 -276
  203. package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
  204. package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  205. package/.agent/skills/web-design-guidelines/SKILL.md +0 -57
  206. package/.agent/skills/webapp-testing/SKILL.md +0 -187
  207. package/.agent/skills/webapp-testing/scripts/playwright_runner.py +0 -173
  208. package/.agent/workflows/brainstorm.md +0 -113
  209. package/.agent/workflows/create.md +0 -59
  210. package/.agent/workflows/debug.md +0 -103
  211. package/.agent/workflows/deploy.md +0 -176
  212. package/.agent/workflows/enhance.md +0 -63
  213. package/.agent/workflows/orchestrate.md +0 -237
  214. package/.agent/workflows/plan.md +0 -89
  215. package/.agent/workflows/preview.md +0 -81
  216. package/.agent/workflows/status.md +0 -86
  217. package/.agent/workflows/test.md +0 -144
  218. package/.agent/workflows/ui-ux-pro-max.md +0 -296
@@ -1,280 +0,0 @@
1
- ---
2
- trigger: always_on
3
- ---
4
-
5
- # GEMINI.md - Antigravity Kit
6
-
7
- > This file defines how the AI behaves in this workspace.
8
-
9
- ---
10
-
11
- ## CRITICAL: AGENT & SKILL PROTOCOL (START HERE)
12
-
13
- > **MANDATORY:** You MUST read the appropriate agent file and its skills BEFORE performing any implementation. This is the highest priority rule.
14
-
15
- ### 1. Modular Skill Loading Protocol
16
-
17
- Agent activated → Check frontmatter "skills:" → Read SKILL.md (INDEX) → Read specific sections.
18
-
19
- - **Selective Reading:** DO NOT read ALL files in a skill folder. Read `SKILL.md` first, then only read sections matching the user's request.
20
- - **Rule Priority:** P0 (GEMINI.md) > P1 (Agent .md) > P2 (SKILL.md). All rules are binding.
21
-
22
- ### 2. Enforcement Protocol
23
-
24
- 1. **When agent is activated:**
25
- - ✅ Activate: Read Rules → Check Frontmatter → Load SKILL.md → Apply All.
26
- 2. **Forbidden:** Never skip reading agent rules or skill instructions. "Read → Understand → Apply" is mandatory.
27
-
28
- ---
29
-
30
- ## 📥 REQUEST CLASSIFIER (STEP 1)
31
-
32
- **Before ANY action, classify the request:**
33
-
34
- | Request Type | Trigger Keywords | Active Tiers | Result |
35
- | ---------------- | ------------------------------------------ | ------------------------------ | --------------------------- |
36
- | **QUESTION** | "what is", "how does", "explain" | TIER 0 only | Text Response |
37
- | **SURVEY/INTEL** | "analyze", "list files", "overview" | TIER 0 + Explorer | Session Intel (No File) |
38
- | **SIMPLE CODE** | "fix", "add", "change" (single file) | TIER 0 + TIER 1 (lite) | Inline Edit |
39
- | **COMPLEX CODE** | "build", "create", "implement", "refactor" | TIER 0 + TIER 1 (full) + Agent | **{task-slug}.md Required** |
40
- | **DESIGN/UI** | "design", "UI", "page", "dashboard" | TIER 0 + TIER 1 + Agent | **{task-slug}.md Required** |
41
- | **SLASH CMD** | /create, /orchestrate, /debug | Command-specific flow | Variable |
42
-
43
- ---
44
-
45
- ## 🤖 INTELLIGENT AGENT ROUTING (STEP 2 - AUTO)
46
-
47
- **ALWAYS ACTIVE: Before responding to ANY request, automatically analyze and select the best agent(s).**
48
-
49
- > 🔴 **MANDATORY:** You MUST follow the protocol defined in `@[skills/intelligent-routing]`.
50
-
51
- ### Auto-Selection Protocol
52
-
53
- 1. **Analyze (Silent)**: Detect domains (Frontend, Backend, Security, etc.) from user request.
54
- 2. **Select Agent(s)**: Choose the most appropriate specialist(s).
55
- 3. **Inform User**: Concisely state which expertise is being applied.
56
- 4. **Apply**: Generate response using the selected agent's persona and rules.
57
-
58
- ### Response Format (MANDATORY)
59
-
60
- When auto-applying an agent, inform the user:
61
-
62
- ```markdown
63
- 🤖 **Applying knowledge of `@[agent-name]`...**
64
-
65
- [Continue with specialized response]
66
- ```
67
-
68
- **Rules:**
69
-
70
- 1. **Silent Analysis**: No verbose meta-commentary ("I am analyzing...").
71
- 2. **Respect Overrides**: If user mentions `@agent`, use it.
72
- 3. **Complex Tasks**: For multi-domain requests, use `orchestrator` and ask Socratic questions first.
73
-
74
- ### ⚠️ AGENT ROUTING CHECKLIST (MANDATORY BEFORE EVERY CODE/DESIGN RESPONSE)
75
-
76
- **Before ANY code or design work, you MUST complete this mental checklist:**
77
-
78
- | Step | Check | If Unchecked |
79
- |------|-------|--------------|
80
- | 1 | Did I identify the correct agent for this domain? | → STOP. Analyze request domain first. |
81
- | 2 | Did I READ the agent's `.md` file (or recall its rules)? | → STOP. Open `.agent/agents/{agent}.md` |
82
- | 3 | Did I announce `🤖 Applying knowledge of @[agent]...`? | → STOP. Add announcement before response. |
83
- | 4 | Did I load required skills from agent's frontmatter? | → STOP. Check `skills:` field and read them. |
84
-
85
- **Failure Conditions:**
86
-
87
- - ❌ Writing code without identifying an agent = **PROTOCOL VIOLATION**
88
- - ❌ Skipping the announcement = **USER CANNOT VERIFY AGENT WAS USED**
89
- - ❌ Ignoring agent-specific rules (e.g., Purple Ban) = **QUALITY FAILURE**
90
-
91
- > 🔴 **Self-Check Trigger:** Every time you are about to write code or create UI, ask yourself:
92
- > "Have I completed the Agent Routing Checklist?" If NO → Complete it first.
93
-
94
- ---
95
-
96
- ## TIER 0: UNIVERSAL RULES (Always Active)
97
-
98
- ### 🌐 Language Handling
99
-
100
- When user's prompt is NOT in English:
101
-
102
- 1. **Internally translate** for better comprehension
103
- 2. **Respond in user's language** - match their communication
104
- 3. **Code comments/variables** remain in English
105
-
106
- ### 🧹 Clean Code (Global Mandatory)
107
-
108
- **ALL code MUST follow `@[skills/clean-code]` rules. No exceptions.**
109
-
110
- - **Code**: Concise, direct, no over-engineering. Self-documenting.
111
- - **Testing**: Mandatory. Pyramid (Unit > Int > E2E) + AAA Pattern.
112
- - **Performance**: Measure first. Adhere to 2025 standards (Core Web Vitals).
113
- - **Infra/Safety**: 5-Phase Deployment. Verify secrets security.
114
-
115
- ### 📁 File Dependency Awareness
116
-
117
- **Before modifying ANY file:**
118
-
119
- 1. Check `CODEBASE.md` → File Dependencies
120
- 2. Identify dependent files
121
- 3. Update ALL affected files together
122
-
123
- ### 🗺️ System Map Read
124
-
125
- > 🔴 **MANDATORY:** Read `ARCHITECTURE.md` at session start to understand Agents, Skills, and Scripts.
126
-
127
- **Path Awareness:**
128
-
129
- - Agents: `.agent/` (Project)
130
- - Skills: `.agent/skills/` (Project)
131
- - Runtime Scripts: `.agent/skills/<skill>/scripts/`
132
-
133
- ### 📚 Proactive Knowledge Sync (Zero Prompting)
134
-
135
- > 🔴 **MANDATORY:** Never wait for the user to remind you to update documentation.
136
-
137
- If your code changes affect the architecture, data flow, API payloads, or core logic, you **MUST** update the relevant `.md` files in `.agent/knowledge/` **IN THE SAME TASK**.
138
- *Leaving the AI Knowledge Base outdated after a logic rewire is a severe protocol violation.*
139
-
140
- ### 🧠 Read → Understand → Apply
141
-
142
- ```
143
- ❌ WRONG: Read agent file → Start coding
144
- ✅ CORRECT: Read → Understand WHY → Apply PRINCIPLES → Code
145
- ```
146
-
147
- **Before coding, answer:**
148
-
149
- 1. What is the GOAL of this agent/skill?
150
- 2. What PRINCIPLES must I apply?
151
- 3. How does this DIFFER from generic output?
152
-
153
- ---
154
-
155
- ## TIER 1: CODE RULES (When Writing Code)
156
-
157
- ### 📱 Project Type Routing
158
-
159
- | Project Type | Primary Agent | Skills |
160
- | -------------------------------------- | --------------------- | ----------------------------- |
161
- | **MOBILE** (iOS, Android, RN, Flutter) | `mobile-developer` | mobile-design |
162
- | **WEB** (Next.js, React web) | `frontend-specialist` | frontend-design |
163
- | **BACKEND** (API, server, DB) | `backend-specialist` | api-patterns, database-design |
164
-
165
- > 🔴 **Mobile + frontend-specialist = WRONG.** Mobile = mobile-developer ONLY.
166
-
167
- ### 🛑 Socratic Gate
168
-
169
- **For complex requests, STOP and ASK first:**
170
-
171
- ### 🛑 GLOBAL SOCRATIC GATE (TIER 0)
172
-
173
- **MANDATORY: Every user request must pass through the Socratic Gate before ANY tool use or implementation.**
174
-
175
- | Request Type | Strategy | Required Action |
176
- | ----------------------- | -------------- | ----------------------------------------------------------------- |
177
- | **New Feature / Build** | Deep Discovery | ASK minimum 3 strategic questions |
178
- | **Code Edit / Bug Fix** | Context Check | Confirm understanding + ask impact questions |
179
- | **Vague / Simple** | Clarification | Ask Purpose, Users, and Scope |
180
- | **Full Orchestration** | Gatekeeper | **STOP** subagents until user confirms plan details |
181
- | **Direct "Proceed"** | Validation | **STOP** → Even if answers are given, ask 2 "Edge Case" questions |
182
-
183
- **Protocol:**
184
-
185
- 1. **Never Assume:** If even 1% is unclear, ASK.
186
- 2. **Handle Spec-heavy Requests:** When user gives a list (Answers 1, 2, 3...), do NOT skip the gate. Instead, ask about **Trade-offs** or **Edge Cases** (e.g., "LocalStorage confirmed, but should we handle data clearing or versioning?") before starting.
187
- 3. **Wait:** Do NOT invoke subagents or write code until the user clears the Gate.
188
- 4. **Reference:** Full protocol in `@[skills/brainstorming]`.
189
-
190
- ### 🏁 Final Checklist Protocol
191
-
192
- **Trigger:** When the user says "son kontrolleri yap", "final checks", "çalıştır tüm testleri", or similar phrases.
193
-
194
- | Task Stage | Command | Purpose |
195
- | ---------------- | -------------------------------------------------- | ------------------------------ |
196
- | **Manual Audit** | `python .agent/scripts/checklist.py .` | Priority-based project audit |
197
- | **Pre-Deploy** | `python .agent/scripts/checklist.py . --url <URL>` | Full Suite + Performance + E2E |
198
-
199
- **Priority Execution Order:**
200
-
201
- 1. **Security** → 2. **Lint** → 3. **Schema** → 4. **Tests** → 5. **UX** → 6. **Seo** → 7. **Lighthouse/E2E**
202
-
203
- **Rules:**
204
-
205
- - **Completion:** A task is NOT finished until `checklist.py` returns success.
206
- - **Reporting:** If it fails, fix the **Critical** blockers first (Security/Lint).
207
-
208
- **Available Scripts (12 total):**
209
-
210
- | Script | Skill | When to Use |
211
- | -------------------------- | --------------------- | ------------------- |
212
- | `security_scan.py` | vulnerability-scanner | Always on deploy |
213
- | `dependency_analyzer.py` | vulnerability-scanner | Weekly / Deploy |
214
- | `lint_runner.py` | lint-and-validate | Every code change |
215
- | `test_runner.py` | testing-patterns | After logic change |
216
- | `schema_validator.py` | database-design | After DB change |
217
- | `ux_audit.py` | frontend-design | After UI change |
218
- | `accessibility_checker.py` | frontend-design | After UI change |
219
- | `seo_checker.py` | seo-fundamentals | After page change |
220
- | `bundle_analyzer.py` | performance-profiling | Before deploy |
221
- | `mobile_audit.py` | mobile-design | After mobile change |
222
- | `lighthouse_audit.py` | performance-profiling | Before deploy |
223
- | `playwright_runner.py` | webapp-testing | Before deploy |
224
-
225
- > 🔴 **Agents & Skills can invoke ANY script** via `python .agent/skills/<skill>/scripts/<script>.py`
226
-
227
- ### 🎭 Gemini Mode Mapping
228
-
229
- | Mode | Agent | Behavior |
230
- | -------- | ----------------- | -------------------------------------------- |
231
- | **plan** | `project-planner` | 4-phase methodology. NO CODE before Phase 4. |
232
- | **ask** | - | Focus on understanding. Ask questions. |
233
- | **edit** | `orchestrator` | Execute. Check `{task-slug}.md` first. |
234
-
235
- **Plan Mode (4-Phase):**
236
-
237
- 1. ANALYSIS → Research, questions
238
- 2. PLANNING → `{task-slug}.md`, task breakdown
239
- 3. SOLUTIONING → Architecture, design (NO CODE!)
240
- 4. IMPLEMENTATION → Code + tests
241
-
242
- > 🔴 **Edit mode:** If multi-file or structural change → Offer to create `{task-slug}.md`. For single-file fixes → Proceed directly.
243
-
244
- ---
245
-
246
- ## TIER 2: DESIGN RULES (Reference)
247
-
248
- > **Design rules are in the specialist agents, NOT here.**
249
-
250
- | Task | Read |
251
- | ------------ | ------------------------------- |
252
- | Web UI/UX | `.agent/frontend-specialist.md` |
253
- | Mobile UI/UX | `.agent/mobile-developer.md` |
254
-
255
- **These agents contain:**
256
-
257
- - Purple Ban (no violet/purple colors)
258
- - Template Ban (no standard layouts)
259
- - Anti-cliché rules
260
- - Deep Design Thinking protocol
261
-
262
- > 🔴 **For design work:** Open and READ the agent file. Rules are there.
263
-
264
- ---
265
-
266
- ## 📁 QUICK REFERENCE
267
-
268
- ### Agents & Skills
269
-
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`
272
-
273
- ### Key Scripts
274
-
275
- - **Verify**: `.agent/scripts/verify_all.py`, `.agent/scripts/checklist.py`
276
- - **Scanners**: `security_scan.py`, `dependency_analyzer.py`
277
- - **Audits**: `ux_audit.py`, `mobile_audit.py`, `lighthouse_audit.py`, `seo_checker.py`
278
- - **Test**: `playwright_runner.py`, `test_runner.py`
279
-
280
- ---
@@ -1,148 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Auto Preview - Antigravity Kit
4
- ==============================
5
- Manages (start/stop/status) the local development server for previewing the application.
6
-
7
- Usage:
8
- python .agent/scripts/auto_preview.py start [port]
9
- python .agent/scripts/auto_preview.py stop
10
- python .agent/scripts/auto_preview.py status
11
- """
12
-
13
- import os
14
- import sys
15
- import time
16
- import json
17
- import signal
18
- import argparse
19
- import subprocess
20
- from pathlib import Path
21
-
22
- AGENT_DIR = Path(".agent")
23
- PID_FILE = AGENT_DIR / "preview.pid"
24
- LOG_FILE = AGENT_DIR / "preview.log"
25
-
26
- def get_project_root():
27
- return Path(".").resolve()
28
-
29
- def is_running(pid):
30
- try:
31
- os.kill(pid, 0)
32
- return True
33
- except OSError:
34
- return False
35
-
36
- def get_start_command(root):
37
- pkg_file = root / "package.json"
38
- if not pkg_file.exists():
39
- return None
40
-
41
- with open(pkg_file, 'r') as f:
42
- data = json.load(f)
43
-
44
- scripts = data.get("scripts", {})
45
- if "dev" in scripts:
46
- return ["npm", "run", "dev"]
47
- elif "start" in scripts:
48
- return ["npm", "start"]
49
- return None
50
-
51
- def start_server(port=3000):
52
- if PID_FILE.exists():
53
- try:
54
- pid = int(PID_FILE.read_text().strip())
55
- if is_running(pid):
56
- print(f"⚠️ Preview already running (PID: {pid})")
57
- return
58
- except:
59
- pass # Invalid PID file
60
-
61
- root = get_project_root()
62
- cmd = get_start_command(root)
63
-
64
- if not cmd:
65
- print("❌ No 'dev' or 'start' script found in package.json")
66
- sys.exit(1)
67
-
68
- # Add port env var if needed (simple heuristic)
69
- env = os.environ.copy()
70
- env["PORT"] = str(port)
71
-
72
- print(f"🚀 Starting preview on port {port}...")
73
-
74
- with open(LOG_FILE, "w") as log:
75
- process = subprocess.Popen(
76
- cmd,
77
- cwd=str(root),
78
- stdout=log,
79
- stderr=log,
80
- env=env,
81
- shell=True # Required for npm on windows often, or consistent path handling
82
- )
83
-
84
- PID_FILE.write_text(str(process.pid))
85
- print(f"✅ Preview started! (PID: {process.pid})")
86
- print(f" Logs: {LOG_FILE}")
87
- print(f" URL: http://localhost:{port}")
88
-
89
- def stop_server():
90
- if not PID_FILE.exists():
91
- print("ℹ️ No preview server found.")
92
- return
93
-
94
- try:
95
- pid = int(PID_FILE.read_text().strip())
96
- if is_running(pid):
97
- # Try gentle kill first
98
- os.kill(pid, signal.SIGTERM) if sys.platform != 'win32' else subprocess.call(['taskkill', '/F', '/T', '/PID', str(pid)])
99
- print(f"🛑 Preview stopped (PID: {pid})")
100
- else:
101
- print("ℹ️ Process was not running.")
102
- except Exception as e:
103
- print(f"❌ Error stopping server: {e}")
104
- finally:
105
- if PID_FILE.exists():
106
- PID_FILE.unlink()
107
-
108
- def status_server():
109
- running = False
110
- pid = None
111
- url = "Unknown"
112
-
113
- if PID_FILE.exists():
114
- try:
115
- pid = int(PID_FILE.read_text().strip())
116
- if is_running(pid):
117
- running = True
118
- # Heuristic for URL, strictly we should save it
119
- url = "http://localhost:3000"
120
- except:
121
- pass
122
-
123
- print("\n=== Preview Status ===")
124
- if running:
125
- print(f"✅ Status: Running")
126
- print(f"🔢 PID: {pid}")
127
- print(f"🌐 URL: {url} (Likely)")
128
- print(f"📝 Logs: {LOG_FILE}")
129
- else:
130
- print("⚪ Status: Stopped")
131
- print("===================\n")
132
-
133
- def main():
134
- parser = argparse.ArgumentParser()
135
- parser.add_argument("action", choices=["start", "stop", "status"])
136
- parser.add_argument("port", nargs="?", default="3000")
137
-
138
- args = parser.parse_args()
139
-
140
- if args.action == "start":
141
- start_server(int(args.port))
142
- elif args.action == "stop":
143
- stop_server()
144
- elif args.action == "status":
145
- status_server()
146
-
147
- if __name__ == "__main__":
148
- main()
@@ -1,217 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Master Checklist Runner - Antigravity Kit
4
- ==========================================
5
-
6
- Orchestrates all validation scripts in priority order.
7
- Use this for incremental validation during development.
8
-
9
- Usage:
10
- python scripts/checklist.py . # Run core checks
11
- python scripts/checklist.py . --url <URL> # Include performance checks
12
-
13
- Priority Order:
14
- P0: Security Scan (vulnerabilities, secrets)
15
- P1: Lint & Type Check (code quality)
16
- P2: Schema Validation (if database exists)
17
- P3: Test Runner (unit/integration tests)
18
- P4: UX Audit (psychology laws, accessibility)
19
- P5: SEO Check (meta tags, structure)
20
- P6: Performance (lighthouse - requires URL)
21
- """
22
-
23
- import sys
24
- import subprocess
25
- import argparse
26
- from pathlib import Path
27
- from typing import List, Tuple, Optional
28
-
29
- # ANSI colors for terminal output
30
- class Colors:
31
- HEADER = '\033[95m'
32
- BLUE = '\033[94m'
33
- CYAN = '\033[96m'
34
- GREEN = '\033[92m'
35
- YELLOW = '\033[93m'
36
- RED = '\033[91m'
37
- ENDC = '\033[0m'
38
- BOLD = '\033[1m'
39
-
40
- def print_header(text: str):
41
- print(f"\n{Colors.BOLD}{Colors.CYAN}{'='*60}{Colors.ENDC}")
42
- print(f"{Colors.BOLD}{Colors.CYAN}{text.center(60)}{Colors.ENDC}")
43
- print(f"{Colors.BOLD}{Colors.CYAN}{'='*60}{Colors.ENDC}\n")
44
-
45
- def print_step(text: str):
46
- print(f"{Colors.BOLD}{Colors.BLUE}🔄 {text}{Colors.ENDC}")
47
-
48
- def print_success(text: str):
49
- print(f"{Colors.GREEN}✅ {text}{Colors.ENDC}")
50
-
51
- def print_warning(text: str):
52
- print(f"{Colors.YELLOW}⚠️ {text}{Colors.ENDC}")
53
-
54
- def print_error(text: str):
55
- print(f"{Colors.RED}❌ {text}{Colors.ENDC}")
56
-
57
- # Define priority-ordered checks
58
- CORE_CHECKS = [
59
- ("Security Scan", ".agent/skills/vulnerability-scanner/scripts/security_scan.py", True),
60
- ("Lint Check", ".agent/skills/lint-and-validate/scripts/lint_runner.py", True),
61
- ("Schema Validation", ".agent/skills/database-design/scripts/schema_validator.py", False),
62
- ("Test Runner", ".agent/skills/testing-patterns/scripts/test_runner.py", False),
63
- ("UX Audit", ".agent/skills/frontend-design/scripts/ux_audit.py", False),
64
- ("SEO Check", ".agent/skills/seo-fundamentals/scripts/seo_checker.py", False),
65
- ]
66
-
67
- PERFORMANCE_CHECKS = [
68
- ("Lighthouse Audit", ".agent/skills/performance-profiling/scripts/lighthouse_audit.py", True),
69
- ("Playwright E2E", ".agent/skills/webapp-testing/scripts/playwright_runner.py", False),
70
- ]
71
-
72
- def check_script_exists(script_path: Path) -> bool:
73
- """Check if script file exists"""
74
- return script_path.exists() and script_path.is_file()
75
-
76
- def run_script(name: str, script_path: Path, project_path: str, url: Optional[str] = None) -> dict:
77
- """
78
- Run a validation script and capture results
79
-
80
- Returns:
81
- dict with keys: name, passed, output, skipped
82
- """
83
- if not check_script_exists(script_path):
84
- print_warning(f"{name}: Script not found, skipping")
85
- return {"name": name, "passed": True, "output": "", "skipped": True}
86
-
87
- print_step(f"Running: {name}")
88
-
89
- # Build command
90
- cmd = ["python", str(script_path), project_path]
91
- if url and ("lighthouse" in script_path.name.lower() or "playwright" in script_path.name.lower()):
92
- cmd.append(url)
93
-
94
- # Run script
95
- try:
96
- result = subprocess.run(
97
- cmd,
98
- capture_output=True,
99
- text=True,
100
- timeout=300 # 5 minute timeout
101
- )
102
-
103
- passed = result.returncode == 0
104
-
105
- if passed:
106
- print_success(f"{name}: PASSED")
107
- else:
108
- print_error(f"{name}: FAILED")
109
- if result.stderr:
110
- print(f" Error: {result.stderr[:200]}")
111
-
112
- return {
113
- "name": name,
114
- "passed": passed,
115
- "output": result.stdout,
116
- "error": result.stderr,
117
- "skipped": False
118
- }
119
-
120
- except subprocess.TimeoutExpired:
121
- print_error(f"{name}: TIMEOUT (>5 minutes)")
122
- return {"name": name, "passed": False, "output": "", "error": "Timeout", "skipped": False}
123
-
124
- except Exception as e:
125
- print_error(f"{name}: ERROR - {str(e)}")
126
- return {"name": name, "passed": False, "output": "", "error": str(e), "skipped": False}
127
-
128
- def print_summary(results: List[dict]):
129
- """Print final summary report"""
130
- print_header("📊 CHECKLIST SUMMARY")
131
-
132
- passed_count = sum(1 for r in results if r["passed"] and not r.get("skipped"))
133
- failed_count = sum(1 for r in results if not r["passed"] and not r.get("skipped"))
134
- skipped_count = sum(1 for r in results if r.get("skipped"))
135
-
136
- print(f"Total Checks: {len(results)}")
137
- print(f"{Colors.GREEN}✅ Passed: {passed_count}{Colors.ENDC}")
138
- print(f"{Colors.RED}❌ Failed: {failed_count}{Colors.ENDC}")
139
- print(f"{Colors.YELLOW}⏭️ Skipped: {skipped_count}{Colors.ENDC}")
140
- print()
141
-
142
- # Detailed results
143
- for r in results:
144
- if r.get("skipped"):
145
- status = f"{Colors.YELLOW}⏭️ {Colors.ENDC}"
146
- elif r["passed"]:
147
- status = f"{Colors.GREEN}✅{Colors.ENDC}"
148
- else:
149
- status = f"{Colors.RED}❌{Colors.ENDC}"
150
-
151
- print(f"{status} {r['name']}")
152
-
153
- print()
154
-
155
- if failed_count > 0:
156
- print_error(f"{failed_count} check(s) FAILED - Please fix before proceeding")
157
- return False
158
- else:
159
- print_success("All checks PASSED ✨")
160
- return True
161
-
162
- def main():
163
- parser = argparse.ArgumentParser(
164
- description="Run Antigravity Kit validation checklist",
165
- formatter_class=argparse.RawDescriptionHelpFormatter,
166
- epilog="""
167
- Examples:
168
- python scripts/checklist.py . # Core checks only
169
- python scripts/checklist.py . --url http://localhost:3000 # Include performance
170
- """
171
- )
172
- parser.add_argument("project", help="Project path to validate")
173
- parser.add_argument("--url", help="URL for performance checks (lighthouse, playwright)")
174
- parser.add_argument("--skip-performance", action="store_true", help="Skip performance checks even if URL provided")
175
-
176
- args = parser.parse_args()
177
-
178
- project_path = Path(args.project).resolve()
179
-
180
- if not project_path.exists():
181
- print_error(f"Project path does not exist: {project_path}")
182
- sys.exit(1)
183
-
184
- print_header("🚀 ANTIGRAVITY KIT - MASTER CHECKLIST")
185
- print(f"Project: {project_path}")
186
- print(f"URL: {args.url if args.url else 'Not provided (performance checks skipped)'}")
187
-
188
- results = []
189
-
190
- # Run core checks
191
- print_header("📋 CORE CHECKS")
192
- for name, script_path, required in CORE_CHECKS:
193
- script = project_path / script_path
194
- result = run_script(name, script, str(project_path))
195
- results.append(result)
196
-
197
- # If required check fails, stop
198
- if required and not result["passed"] and not result.get("skipped"):
199
- print_error(f"CRITICAL: {name} failed. Stopping checklist.")
200
- print_summary(results)
201
- sys.exit(1)
202
-
203
- # Run performance checks if URL provided
204
- if args.url and not args.skip_performance:
205
- print_header("⚡ PERFORMANCE CHECKS")
206
- for name, script_path, required in PERFORMANCE_CHECKS:
207
- script = project_path / script_path
208
- result = run_script(name, script, str(project_path), args.url)
209
- results.append(result)
210
-
211
- # Print summary
212
- all_passed = print_summary(results)
213
-
214
- sys.exit(0 if all_passed else 1)
215
-
216
- if __name__ == "__main__":
217
- main()