thachvd-kit 1.0.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 (226) hide show
  1. package/.shared/ui-ux-pro-max/data/charts.csv +26 -0
  2. package/.shared/ui-ux-pro-max/data/colors.csv +97 -0
  3. package/.shared/ui-ux-pro-max/data/icons.csv +101 -0
  4. package/.shared/ui-ux-pro-max/data/landing.csv +31 -0
  5. package/.shared/ui-ux-pro-max/data/products.csv +97 -0
  6. package/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
  7. package/.shared/ui-ux-pro-max/data/react-performance.csv +45 -0
  8. package/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  9. package/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  10. package/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  11. package/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  12. package/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  13. package/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  14. package/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  15. package/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
  16. package/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  17. package/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  18. package/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  19. package/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  20. package/.shared/ui-ux-pro-max/data/styles.csv +59 -0
  21. package/.shared/ui-ux-pro-max/data/typography.csv +58 -0
  22. package/.shared/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  23. package/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  24. package/.shared/ui-ux-pro-max/data/web-interface.csv +31 -0
  25. package/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
  26. package/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  27. package/.shared/ui-ux-pro-max/scripts/core.py +258 -0
  28. package/.shared/ui-ux-pro-max/scripts/design_system.py +1067 -0
  29. package/.shared/ui-ux-pro-max/scripts/search.py +106 -0
  30. package/ARCHITECTURE.md +288 -0
  31. package/CLAUDE.md +90 -0
  32. package/PROJECT_CONTEXT.template.md +68 -0
  33. package/README.md +69 -0
  34. package/agents/backend-specialist.md +263 -0
  35. package/agents/code-archaeologist.md +106 -0
  36. package/agents/database-architect.md +226 -0
  37. package/agents/debugger.md +225 -0
  38. package/agents/devops-engineer.md +242 -0
  39. package/agents/documentation-writer.md +104 -0
  40. package/agents/explorer-agent.md +73 -0
  41. package/agents/frontend-specialist.md +593 -0
  42. package/agents/game-developer.md +162 -0
  43. package/agents/mobile-developer.md +377 -0
  44. package/agents/orchestrator.md +416 -0
  45. package/agents/penetration-tester.md +188 -0
  46. package/agents/performance-optimizer.md +187 -0
  47. package/agents/product-manager.md +112 -0
  48. package/agents/product-owner.md +95 -0
  49. package/agents/project-planner.md +406 -0
  50. package/agents/qa-automation-engineer.md +103 -0
  51. package/agents/security-auditor.md +170 -0
  52. package/agents/seo-specialist.md +111 -0
  53. package/agents/test-engineer.md +158 -0
  54. package/bin/cli.js +373 -0
  55. package/kit/PROJECT_CONTEXT.template.md +35 -0
  56. package/kit/PROMPT_RECIPE.md +52 -0
  57. package/kit/README.md +32 -0
  58. package/mcp_config.json +24 -0
  59. package/package.json +25 -0
  60. package/rules/GEMINI.md +204 -0
  61. package/scripts/auto_preview.py +148 -0
  62. package/scripts/checklist.py +217 -0
  63. package/scripts/init.py +403 -0
  64. package/scripts/session_manager.py +120 -0
  65. package/scripts/verify_all.py +327 -0
  66. package/skills/api-design/SKILL.md +156 -0
  67. package/skills/api-patterns/SKILL.md +81 -0
  68. package/skills/api-patterns/api-style.md +42 -0
  69. package/skills/api-patterns/auth.md +24 -0
  70. package/skills/api-patterns/documentation.md +26 -0
  71. package/skills/api-patterns/graphql.md +41 -0
  72. package/skills/api-patterns/rate-limiting.md +31 -0
  73. package/skills/api-patterns/response.md +37 -0
  74. package/skills/api-patterns/rest.md +40 -0
  75. package/skills/api-patterns/scripts/api_validator.py +211 -0
  76. package/skills/api-patterns/security-testing.md +122 -0
  77. package/skills/api-patterns/trpc.md +41 -0
  78. package/skills/api-patterns/versioning.md +22 -0
  79. package/skills/app-builder/SKILL.md +75 -0
  80. package/skills/app-builder/agent-coordination.md +71 -0
  81. package/skills/app-builder/feature-building.md +53 -0
  82. package/skills/app-builder/project-detection.md +34 -0
  83. package/skills/app-builder/scaffolding.md +118 -0
  84. package/skills/app-builder/tech-stack.md +40 -0
  85. package/skills/app-builder/templates/SKILL.md +39 -0
  86. package/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  87. package/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  88. package/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  89. package/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  90. package/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  91. package/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  92. package/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  93. package/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
  94. package/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
  95. package/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
  96. package/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
  97. package/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  98. package/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
  99. package/skills/architecture/SKILL.md +55 -0
  100. package/skills/architecture/context-discovery.md +43 -0
  101. package/skills/architecture/examples.md +94 -0
  102. package/skills/architecture/pattern-selection.md +68 -0
  103. package/skills/architecture/patterns-reference.md +50 -0
  104. package/skills/architecture/trade-off-analysis.md +77 -0
  105. package/skills/bash-linux/SKILL.md +199 -0
  106. package/skills/behavioral-modes/SKILL.md +242 -0
  107. package/skills/brainstorming/SKILL.md +163 -0
  108. package/skills/brainstorming/dynamic-questioning.md +350 -0
  109. package/skills/clean-code/SKILL.md +201 -0
  110. package/skills/code-review-checklist/SKILL.md +109 -0
  111. package/skills/database-design/SKILL.md +52 -0
  112. package/skills/database-design/database-selection.md +43 -0
  113. package/skills/database-design/indexing.md +39 -0
  114. package/skills/database-design/migrations.md +48 -0
  115. package/skills/database-design/optimization.md +36 -0
  116. package/skills/database-design/orm-selection.md +30 -0
  117. package/skills/database-design/schema-design.md +56 -0
  118. package/skills/database-design/scripts/schema_validator.py +172 -0
  119. package/skills/deployment-procedures/SKILL.md +241 -0
  120. package/skills/dispatching-parallel-agents/SKILL.md +112 -0
  121. package/skills/doc.md +177 -0
  122. package/skills/docker-patterns/SKILL.md +232 -0
  123. package/skills/documentation-templates/SKILL.md +194 -0
  124. package/skills/executing-plans/SKILL.md +61 -0
  125. package/skills/finishing-a-development-branch/SKILL.md +135 -0
  126. package/skills/frontend-design/SKILL.md +418 -0
  127. package/skills/frontend-design/animation-guide.md +331 -0
  128. package/skills/frontend-design/color-system.md +311 -0
  129. package/skills/frontend-design/decision-trees.md +418 -0
  130. package/skills/frontend-design/motion-graphics.md +306 -0
  131. package/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  132. package/skills/frontend-design/scripts/ux_audit.py +722 -0
  133. package/skills/frontend-design/typography-system.md +345 -0
  134. package/skills/frontend-design/ux-psychology.md +1116 -0
  135. package/skills/frontend-design/visual-effects.md +383 -0
  136. package/skills/game-development/2d-games/SKILL.md +119 -0
  137. package/skills/game-development/3d-games/SKILL.md +135 -0
  138. package/skills/game-development/SKILL.md +167 -0
  139. package/skills/game-development/game-art/SKILL.md +185 -0
  140. package/skills/game-development/game-audio/SKILL.md +190 -0
  141. package/skills/game-development/game-design/SKILL.md +129 -0
  142. package/skills/game-development/mobile-games/SKILL.md +108 -0
  143. package/skills/game-development/multiplayer/SKILL.md +132 -0
  144. package/skills/game-development/pc-games/SKILL.md +144 -0
  145. package/skills/game-development/vr-ar/SKILL.md +123 -0
  146. package/skills/game-development/web-games/SKILL.md +150 -0
  147. package/skills/geo-fundamentals/SKILL.md +156 -0
  148. package/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  149. package/skills/golang-patterns/SKILL.md +226 -0
  150. package/skills/golang-testing/SKILL.md +182 -0
  151. package/skills/i18n-localization/SKILL.md +154 -0
  152. package/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  153. package/skills/intelligent-routing/SKILL.md +335 -0
  154. package/skills/laravel-patterns/SKILL.md +224 -0
  155. package/skills/laravel-security/SKILL.md +171 -0
  156. package/skills/laravel-tdd/SKILL.md +149 -0
  157. package/skills/lint-and-validate/SKILL.md +45 -0
  158. package/skills/lint-and-validate/scripts/lint_runner.py +184 -0
  159. package/skills/lint-and-validate/scripts/type_coverage.py +173 -0
  160. package/skills/mcp-builder/SKILL.md +176 -0
  161. package/skills/mobile-design/SKILL.md +394 -0
  162. package/skills/mobile-design/decision-trees.md +516 -0
  163. package/skills/mobile-design/mobile-backend.md +491 -0
  164. package/skills/mobile-design/mobile-color-system.md +420 -0
  165. package/skills/mobile-design/mobile-debugging.md +122 -0
  166. package/skills/mobile-design/mobile-design-thinking.md +357 -0
  167. package/skills/mobile-design/mobile-navigation.md +458 -0
  168. package/skills/mobile-design/mobile-performance.md +767 -0
  169. package/skills/mobile-design/mobile-testing.md +356 -0
  170. package/skills/mobile-design/mobile-typography.md +433 -0
  171. package/skills/mobile-design/platform-android.md +666 -0
  172. package/skills/mobile-design/platform-ios.md +561 -0
  173. package/skills/mobile-design/scripts/mobile_audit.py +670 -0
  174. package/skills/mobile-design/touch-psychology.md +537 -0
  175. package/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  176. package/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  177. package/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  178. package/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  179. package/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  180. package/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  181. package/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  182. package/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  183. package/skills/nextjs-react-expert/SKILL.md +286 -0
  184. package/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  185. package/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  186. package/skills/nodejs-best-practices/SKILL.md +333 -0
  187. package/skills/parallel-agents/SKILL.md +175 -0
  188. package/skills/performance-profiling/SKILL.md +143 -0
  189. package/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
  190. package/skills/plan-writing/SKILL.md +152 -0
  191. package/skills/powershell-windows/SKILL.md +167 -0
  192. package/skills/project-onboarding/SKILL.md +62 -0
  193. package/skills/python-patterns/SKILL.md +441 -0
  194. package/skills/receiving-code-review/SKILL.md +120 -0
  195. package/skills/red-team-tactics/SKILL.md +199 -0
  196. package/skills/requesting-code-review/SKILL.md +67 -0
  197. package/skills/rust-pro/SKILL.md +176 -0
  198. package/skills/seo-fundamentals/SKILL.md +129 -0
  199. package/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  200. package/skills/server-management/SKILL.md +161 -0
  201. package/skills/subagent-driven-development/SKILL.md +76 -0
  202. package/skills/systematic-debugging/SKILL.md +109 -0
  203. package/skills/tailwind-patterns/SKILL.md +269 -0
  204. package/skills/tdd-workflow/SKILL.md +149 -0
  205. package/skills/testing-patterns/SKILL.md +178 -0
  206. package/skills/testing-patterns/scripts/test_runner.py +219 -0
  207. package/skills/using-git-worktrees/SKILL.md +122 -0
  208. package/skills/verification-before-completion/SKILL.md +99 -0
  209. package/skills/vulnerability-scanner/SKILL.md +276 -0
  210. package/skills/vulnerability-scanner/checklists.md +121 -0
  211. package/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  212. package/skills/web-design-guidelines/SKILL.md +57 -0
  213. package/skills/webapp-testing/SKILL.md +187 -0
  214. package/skills/webapp-testing/scripts/playwright_runner.py +173 -0
  215. package/skills/writing-skills/SKILL.md +110 -0
  216. package/workflows/brainstorm.md +113 -0
  217. package/workflows/create.md +59 -0
  218. package/workflows/debug.md +103 -0
  219. package/workflows/deploy.md +176 -0
  220. package/workflows/enhance.md +63 -0
  221. package/workflows/orchestrate.md +237 -0
  222. package/workflows/plan.md +89 -0
  223. package/workflows/preview.md +81 -0
  224. package/workflows/status.md +86 -0
  225. package/workflows/test.md +144 -0
  226. package/workflows/ui-ux-pro-max.md +296 -0
@@ -0,0 +1,52 @@
1
+ # 📜 PROMPT RECIPES - Coding Agent Strategy
2
+
3
+ Use these templates to enforce modular design, clean architecture, and contextual awareness in any project.
4
+
5
+ ---
6
+
7
+ ## đŸ—ī¸ 1. Project Initiation (Architecture First)
8
+ Use this when starting a new project. Force the Agent to design the structure before writing any code.
9
+
10
+ > "I want to initialize a new project: [Project Name].
11
+ > **Stack:** [e.g., Next.js, FastAPI, Flutter, etc.]
12
+ >
13
+ > **Architectural Requirements:**
14
+ > 1. Follow a **Modular & Scalable** approach. Keep components atomic and logic decoupled.
15
+ > 2. **State Management:** Use [e.g., Zustand, Redux, Provier, or none] with a modular pattern.
16
+ > 3. **Separation of Concerns:** Keep business logic outside of UI files (use services/use-cases/lib).
17
+ > 4. **Resource Management:** Offload heavy computations or system-level tasks to [e.g., Rust, Go, or Backend].
18
+ > 5. **Constraints:** Enforce a maximum of **250 lines per file** to ensure atomicity.
19
+ >
20
+ > Please propose a detailed **File Tree** and explain the responsibility of each directory before implementation."
21
+
22
+ ---
23
+
24
+ ## ⚡ 2. Complex Feature Implementation
25
+ Use this for hard tasks that require deep thinking.
26
+
27
+ > "I need to implement the following feature: [Feature Description].
28
+ >
29
+ > **Execution Workflow:**
30
+ > 1. Analyze the project baseline from `PROJECT_CONTEXT.md`.
31
+ > 2. Propose a **Data Flow Diagram** or a sequence of operations.
32
+ > 3. Break down the task into small, manageable files: State/Store, Logic/Service, and UI/Component.
33
+ > 4. Ensure compliance with the project's **Clean Code** standards."
34
+
35
+ ---
36
+
37
+ ## 🐞 3. Systemic Debugging
38
+ Use this when facing logic errors or unexpected behavior.
39
+
40
+ > "The application is encountering the following issue: [Error Description].
41
+ >
42
+ > **Instructions:**
43
+ > 1. Identify the **Root Cause** by inspecting logs or using diagnostic tools.
44
+ > 2. Verify if this issue impacts the system assumptions defined in `PROJECT_CONTEXT.md`.
45
+ > 3. Fix the issue using a sustainable approach. If an architectural refactor is required for a permanent fix, please propose it first."
46
+
47
+ ---
48
+
49
+ ## 🔄 4. Context Synchronization
50
+ Use this at the end of a session or after significant structural changes.
51
+
52
+ > "I have completed [Task/Feature]. Please update the **`PROJECT_CONTEXT.md`** file to reflect the latest state of the project, including new files created, technical decisions made, and current progress status."
package/kit/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # đŸ›Ąī¸ Antigravity Project Kit
2
+
3
+ This toolkit helps you build high-quality, modular, and performance-optimized applications by leveraging the full power of AI Agents with a Context-First approach.
4
+
5
+ ---
6
+
7
+ ## 🚀 How to Use
8
+
9
+ ### 1. Initialization (Clone & Use)
10
+ - Clone this repository.
11
+ - Update project metadata (e.g., `package.json`).
12
+ - Rename and fill out `PROJECT_CONTEXT.template.md` as `PROJECT_CONTEXT.md` in the root directory.
13
+
14
+ ### 2. Working with AI Agents
15
+ - Always use the templates provided in `kit/PROMPT_RECIPE.md`.
16
+ - Ensure the Agent reads and updates `PROJECT_CONTEXT.md`.
17
+ - Enforce file splitting rules (e.g., Max 250 lines) to maintain a clean codebase.
18
+
19
+ ### 3. Proposed Structure
20
+ - `.agent/rules/GEMINI.md`: Core behavioral rules and protocols.
21
+ - `.agent/kit/`: Manuals and templates for project management.
22
+ - `PROJECT_CONTEXT.md`: (Manual creation required) The active map of the current project.
23
+
24
+ ## 💎 Golden Rules
25
+ 1. **Context is King:** Never let the Agent work without a clear Ground Truth.
26
+ 2. **Architecture First:** Design the structure before writing any implementation code.
27
+ 3. **Keep it Small:** Small files are easier for AI to understand, modify, and keep in context.
28
+ 4. **Self-Documenting:** The Agent is responsible for maintaining the project documentation.
29
+
30
+ ---
31
+
32
+ *Powered by Antigravity Framework.*
@@ -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
+
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "thachvd-kit",
3
+ "version": "1.0.0",
4
+ "description": "Universal Agent Kit for Antigravity, Claude Code, and OpenCode",
5
+ "main": "index.js",
6
+ "bin": {
7
+ "thachvd-kit": "./bin/cli.js"
8
+ },
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ },
12
+ "keywords": [
13
+ "ai",
14
+ "agent",
15
+ "claude",
16
+ "antigravity",
17
+ "codex"
18
+ ],
19
+ "author": "thachvd",
20
+ "license": "MIT",
21
+ "dependencies": {
22
+ "picocolors": "^1.0.0",
23
+ "prompts": "^2.4.2"
24
+ }
25
+ }
@@ -0,0 +1,204 @@
1
+ ---
2
+ trigger: always_on
3
+ ---
4
+
5
+ # GEMINI.md — Universal Agent Kit
6
+
7
+ > Cross-platform agent protocol. Works with: Antigravity ¡ Claude Code ¡ Codex ¡ OpenCode
8
+
9
+ ---
10
+
11
+ ## MANDATORY FIRST ACTION
12
+
13
+ **At session start — before anything else:**
14
+
15
+ ```
16
+ 1. Read PROJECT_CONTEXT.md (if exists) → load stack, agents, constraints
17
+ 2. If missing → run @[skills/project-onboarding] to create it
18
+ 3. Confirm: "Context loaded: [Project Name] | Stack: [Stack] | Ready."
19
+ ```
20
+
21
+ > All routing decisions below depend on PROJECT_CONTEXT.md.
22
+ > Without it, ask user to run: `python scripts/init.py`
23
+
24
+ ---
25
+
26
+ ## STEP 1 — CLASSIFY REQUEST
27
+
28
+ | Type | Triggers | Action |
29
+ |------|----------|--------|
30
+ | **QUESTION** | "what", "how", "explain", "why" | Direct answer |
31
+ | **SURVEY** | "analyze", "list", "overview", "check" | Analysis only, no code |
32
+ | **SIMPLE FIX** | "fix", "add", "change" (single file) | Inline edit |
33
+ | **BUILD** | "build", "create", "implement", "refactor" | Agent + `{task-slug}.md` |
34
+ | **DESIGN/UI** | "design", "UI", "page", "dashboard" | Agent + `{task-slug}.md` |
35
+
36
+ ---
37
+
38
+ ## STEP 2 — AUTO-SELECT AGENT
39
+
40
+ **Protocol:**
41
+ 1. Read `stack.primary_language` and `stack.frameworks` from PROJECT_CONTEXT.md
42
+ 2. Match to agent table below
43
+ 3. Announce before responding:
44
+
45
+ ```
46
+ 🤖 Applying knowledge of `@[agent-name]`...
47
+ ```
48
+
49
+ ### Agent Routing Table
50
+
51
+ | Domain | Agent | Skills to Load |
52
+ |--------|-------|---------------|
53
+ | Web frontend (any framework) | `frontend-specialist` | `frontend-design` + framework skill from PROJECT_CONTEXT |
54
+ | Backend API (any language) | `backend-specialist` | language skill + `api-design` |
55
+ | Database / Schema | `database-architect` | `database-design` |
56
+ | Mobile / Desktop (Tauri, RN, Flutter) | `mobile-developer` | `mobile-design` |
57
+ | DevOps / Cloud / CI | `devops-engineer` | `docker-patterns`, `deployment-procedures` |
58
+ | Security audit | `security-auditor` | `vulnerability-scanner` |
59
+ | Debug / RCA | `debugger` | `systematic-debugging` |
60
+ | Planning / Discovery | `project-planner` | `brainstorming`, `plan-writing` |
61
+ | Multi-domain | `orchestrator` | `dispatching-parallel-agents` |
62
+
63
+ **Framework-specific skill mapping** (reference PROJECT_CONTEXT.stack):
64
+
65
+ | Framework/Language | Load Skill |
66
+ |-------------------|-----------|
67
+ | Vue | `frontend-design` (+ Vue-specific if available) |
68
+ | React / Next.js | `nextjs-react-expert` |
69
+ | Laravel | `laravel-patterns` + `laravel-security` |
70
+ | Node.js | `nodejs-best-practices` |
71
+ | Python | `python-patterns` |
72
+ | Go | `golang-patterns` |
73
+ | Rust / Tauri | `rust-pro` |
74
+ | Docker | `docker-patterns` |
75
+
76
+ > If stack not in mapping → use agent's general skill set + `clean-code`.
77
+
78
+ **MANDATORY checklist before any code:**
79
+ - [ ] Agent identified from PROJECT_CONTEXT.md stack?
80
+ - [ ] Agent `.md` file read/recalled?
81
+ - [ ] Announcement `🤖 Applying knowledge of @[agent]...` written?
82
+
83
+ > 🔴 Code without announcement = **PROTOCOL VIOLATION**
84
+
85
+ ---
86
+
87
+ ## STEP 3 — SOCRATIC GATE
88
+
89
+ **Trigger: BUILD or DESIGN/UI requests only**
90
+
91
+ | Scenario | Action |
92
+ |----------|--------|
93
+ | New feature / greenfield | Ask **3 questions**: Purpose ¡ Users ¡ Must-have vs Nice-to-have |
94
+ | Code edit / bug fix | Confirm scope + 1 impact question |
95
+ | Vague request | Ask Purpose + Constraints |
96
+ | User gave full spec | **Proceed immediately** |
97
+ | User says "proceed" / "just do it" | **DO IT — no more questions** |
98
+
99
+ **Rules:**
100
+ - Max 3 questions at once
101
+ - Never ask edge case questions after user already answered
102
+ - Reference `@[skills/brainstorming]` for question format
103
+
104
+ ---
105
+
106
+ ## UNIVERSAL RULES (Always Active)
107
+
108
+ ### Language
109
+ - Respond in user's language (auto-detect from prompt)
110
+ - Code comments/variables always in English
111
+
112
+ ### Code Quality
113
+ - `@[skills/clean-code]` applies to ALL code, ALL languages
114
+ - Tests mandatory: Unit > Integration > E2E
115
+ - `@[skills/verification-before-completion]` before claiming "done"
116
+
117
+ ### File Changes
118
+ - Identify dependent files before modifying
119
+ - Update ALL affected files together
120
+
121
+ ---
122
+
123
+ ## EXECUTION WORKFLOW
124
+
125
+ **BUILD tasks — 7-step flow:**
126
+
127
+ ```
128
+ 1. brainstorming → Clarify (Socratic Gate)
129
+ 2. plan-writing → Create {task-slug}.md
130
+ 3. using-git-worktrees → Isolated workspace
131
+ 4. subagent-driven-development → Implement + 2-stage review
132
+ 5. requesting-code-review → After each major task
133
+ 6. verification-before-completion → Before claiming done
134
+ 7. finishing-a-development-branch → Merge / PR / keep
135
+ ```
136
+
137
+ **SIMPLE FIX:** Skip to step 4, no worktree needed.
138
+
139
+ ---
140
+
141
+ ## MODE BEHAVIOR
142
+
143
+ | Mode | Behavior |
144
+ |------|----------|
145
+ | **plan** | Analysis → Planning → Architecture → NO CODE until confirmed |
146
+ | **ask** | Questions and analysis only |
147
+ | **edit** | Execute. Multi-file → create `{task-slug}.md`. Single-file → proceed. |
148
+
149
+ ---
150
+
151
+ ## FINAL CHECK
152
+
153
+ **Trigger:** "final check", "deploy check", "kiáģƒm tra cuáģ‘i", "done?"
154
+
155
+ ```bash
156
+ python scripts/checklist.py .
157
+ ```
158
+
159
+ Priority: Security → Lint → Tests → UX → SEO
160
+
161
+ ---
162
+
163
+ ## PATHS
164
+
165
+ ```
166
+ agents/ → agents/{agent}.md
167
+ skills/ → skills/{skill}/SKILL.md
168
+ workflows/ → workflows/{command}.md
169
+ scripts/ → scripts/init.py, checklist.py, verify_all.py
170
+ ```
171
+
172
+ ---
173
+
174
+ ## QUICK SKILL REFERENCE
175
+
176
+ | Need | Skill |
177
+ |------|-------|
178
+ | Clean code (any lang) | `clean-code` |
179
+ | Plan a task | `plan-writing` → `executing-plans` |
180
+ | Parallel agents | `dispatching-parallel-agents` |
181
+ | Code review | `requesting-code-review` / `receiving-code-review` |
182
+ | Git isolation | `using-git-worktrees` |
183
+ | Agent-based dev | `subagent-driven-development` |
184
+ | Verify done | `verification-before-completion` |
185
+ | Finish branch | `finishing-a-development-branch` |
186
+ | Write new skill | `writing-skills` |
187
+ | API design | `api-design` |
188
+ | Docker | `docker-patterns` |
189
+ | Laravel | `laravel-patterns`, `laravel-security`, `laravel-tdd` |
190
+ | Go | `golang-patterns`, `golang-testing` |
191
+ | Debugging | `systematic-debugging` |
192
+ | Security | `vulnerability-scanner` |
193
+
194
+ ---
195
+
196
+ ## CROSS-PLATFORM NOTES
197
+
198
+ | Platform | Rules File | Skills Dir | Workflows |
199
+ |----------|-----------|-----------|-----------|
200
+ | **Antigravity** | `rules/GEMINI.md` (this file) | `skills/` | `workflows/` |
201
+ | **Claude Code** | `CLAUDE.md` at project root | `.claude/skills/` | `.claude/commands/` |
202
+ | **Codex / OpenCode** | `CLAUDE.md` at project root | `.claude/skills/` | — |
203
+
204
+ > Run `python scripts/init.py --platform all` to generate platform-specific config files automatically.
@@ -0,0 +1,148 @@
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()