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.
- package/.shared/ui-ux-pro-max/data/charts.csv +26 -0
- package/.shared/ui-ux-pro-max/data/colors.csv +97 -0
- package/.shared/ui-ux-pro-max/data/icons.csv +101 -0
- package/.shared/ui-ux-pro-max/data/landing.csv +31 -0
- package/.shared/ui-ux-pro-max/data/products.csv +97 -0
- package/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
- package/.shared/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.shared/ui-ux-pro-max/data/styles.csv +59 -0
- package/.shared/ui-ux-pro-max/data/typography.csv +58 -0
- package/.shared/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.shared/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
- package/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
- package/.shared/ui-ux-pro-max/scripts/core.py +258 -0
- package/.shared/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.shared/ui-ux-pro-max/scripts/search.py +106 -0
- package/ARCHITECTURE.md +288 -0
- package/CLAUDE.md +90 -0
- package/PROJECT_CONTEXT.template.md +68 -0
- package/README.md +69 -0
- package/agents/backend-specialist.md +263 -0
- package/agents/code-archaeologist.md +106 -0
- package/agents/database-architect.md +226 -0
- package/agents/debugger.md +225 -0
- package/agents/devops-engineer.md +242 -0
- package/agents/documentation-writer.md +104 -0
- package/agents/explorer-agent.md +73 -0
- package/agents/frontend-specialist.md +593 -0
- package/agents/game-developer.md +162 -0
- package/agents/mobile-developer.md +377 -0
- package/agents/orchestrator.md +416 -0
- package/agents/penetration-tester.md +188 -0
- package/agents/performance-optimizer.md +187 -0
- package/agents/product-manager.md +112 -0
- package/agents/product-owner.md +95 -0
- package/agents/project-planner.md +406 -0
- package/agents/qa-automation-engineer.md +103 -0
- package/agents/security-auditor.md +170 -0
- package/agents/seo-specialist.md +111 -0
- package/agents/test-engineer.md +158 -0
- package/bin/cli.js +373 -0
- package/kit/PROJECT_CONTEXT.template.md +35 -0
- package/kit/PROMPT_RECIPE.md +52 -0
- package/kit/README.md +32 -0
- package/mcp_config.json +24 -0
- package/package.json +25 -0
- package/rules/GEMINI.md +204 -0
- package/scripts/auto_preview.py +148 -0
- package/scripts/checklist.py +217 -0
- package/scripts/init.py +403 -0
- package/scripts/session_manager.py +120 -0
- package/scripts/verify_all.py +327 -0
- package/skills/api-design/SKILL.md +156 -0
- package/skills/api-patterns/SKILL.md +81 -0
- package/skills/api-patterns/api-style.md +42 -0
- package/skills/api-patterns/auth.md +24 -0
- package/skills/api-patterns/documentation.md +26 -0
- package/skills/api-patterns/graphql.md +41 -0
- package/skills/api-patterns/rate-limiting.md +31 -0
- package/skills/api-patterns/response.md +37 -0
- package/skills/api-patterns/rest.md +40 -0
- package/skills/api-patterns/scripts/api_validator.py +211 -0
- package/skills/api-patterns/security-testing.md +122 -0
- package/skills/api-patterns/trpc.md +41 -0
- package/skills/api-patterns/versioning.md +22 -0
- package/skills/app-builder/SKILL.md +75 -0
- package/skills/app-builder/agent-coordination.md +71 -0
- package/skills/app-builder/feature-building.md +53 -0
- package/skills/app-builder/project-detection.md +34 -0
- package/skills/app-builder/scaffolding.md +118 -0
- package/skills/app-builder/tech-stack.md +40 -0
- package/skills/app-builder/templates/SKILL.md +39 -0
- package/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
- package/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
- package/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
- package/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
- package/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
- package/skills/architecture/SKILL.md +55 -0
- package/skills/architecture/context-discovery.md +43 -0
- package/skills/architecture/examples.md +94 -0
- package/skills/architecture/pattern-selection.md +68 -0
- package/skills/architecture/patterns-reference.md +50 -0
- package/skills/architecture/trade-off-analysis.md +77 -0
- package/skills/bash-linux/SKILL.md +199 -0
- package/skills/behavioral-modes/SKILL.md +242 -0
- package/skills/brainstorming/SKILL.md +163 -0
- package/skills/brainstorming/dynamic-questioning.md +350 -0
- package/skills/clean-code/SKILL.md +201 -0
- package/skills/code-review-checklist/SKILL.md +109 -0
- package/skills/database-design/SKILL.md +52 -0
- package/skills/database-design/database-selection.md +43 -0
- package/skills/database-design/indexing.md +39 -0
- package/skills/database-design/migrations.md +48 -0
- package/skills/database-design/optimization.md +36 -0
- package/skills/database-design/orm-selection.md +30 -0
- package/skills/database-design/schema-design.md +56 -0
- package/skills/database-design/scripts/schema_validator.py +172 -0
- package/skills/deployment-procedures/SKILL.md +241 -0
- package/skills/dispatching-parallel-agents/SKILL.md +112 -0
- package/skills/doc.md +177 -0
- package/skills/docker-patterns/SKILL.md +232 -0
- package/skills/documentation-templates/SKILL.md +194 -0
- package/skills/executing-plans/SKILL.md +61 -0
- package/skills/finishing-a-development-branch/SKILL.md +135 -0
- package/skills/frontend-design/SKILL.md +418 -0
- package/skills/frontend-design/animation-guide.md +331 -0
- package/skills/frontend-design/color-system.md +311 -0
- package/skills/frontend-design/decision-trees.md +418 -0
- package/skills/frontend-design/motion-graphics.md +306 -0
- package/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/skills/frontend-design/typography-system.md +345 -0
- package/skills/frontend-design/ux-psychology.md +1116 -0
- package/skills/frontend-design/visual-effects.md +383 -0
- package/skills/game-development/2d-games/SKILL.md +119 -0
- package/skills/game-development/3d-games/SKILL.md +135 -0
- package/skills/game-development/SKILL.md +167 -0
- package/skills/game-development/game-art/SKILL.md +185 -0
- package/skills/game-development/game-audio/SKILL.md +190 -0
- package/skills/game-development/game-design/SKILL.md +129 -0
- package/skills/game-development/mobile-games/SKILL.md +108 -0
- package/skills/game-development/multiplayer/SKILL.md +132 -0
- package/skills/game-development/pc-games/SKILL.md +144 -0
- package/skills/game-development/vr-ar/SKILL.md +123 -0
- package/skills/game-development/web-games/SKILL.md +150 -0
- package/skills/geo-fundamentals/SKILL.md +156 -0
- package/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/skills/golang-patterns/SKILL.md +226 -0
- package/skills/golang-testing/SKILL.md +182 -0
- package/skills/i18n-localization/SKILL.md +154 -0
- package/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/skills/intelligent-routing/SKILL.md +335 -0
- package/skills/laravel-patterns/SKILL.md +224 -0
- package/skills/laravel-security/SKILL.md +171 -0
- package/skills/laravel-tdd/SKILL.md +149 -0
- package/skills/lint-and-validate/SKILL.md +45 -0
- package/skills/lint-and-validate/scripts/lint_runner.py +184 -0
- package/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/skills/mcp-builder/SKILL.md +176 -0
- package/skills/mobile-design/SKILL.md +394 -0
- package/skills/mobile-design/decision-trees.md +516 -0
- package/skills/mobile-design/mobile-backend.md +491 -0
- package/skills/mobile-design/mobile-color-system.md +420 -0
- package/skills/mobile-design/mobile-debugging.md +122 -0
- package/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/skills/mobile-design/mobile-navigation.md +458 -0
- package/skills/mobile-design/mobile-performance.md +767 -0
- package/skills/mobile-design/mobile-testing.md +356 -0
- package/skills/mobile-design/mobile-typography.md +433 -0
- package/skills/mobile-design/platform-android.md +666 -0
- package/skills/mobile-design/platform-ios.md +561 -0
- package/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/skills/mobile-design/touch-psychology.md +537 -0
- package/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
- package/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/skills/nextjs-react-expert/SKILL.md +286 -0
- package/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/skills/nodejs-best-practices/SKILL.md +333 -0
- package/skills/parallel-agents/SKILL.md +175 -0
- package/skills/performance-profiling/SKILL.md +143 -0
- package/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/skills/plan-writing/SKILL.md +152 -0
- package/skills/powershell-windows/SKILL.md +167 -0
- package/skills/project-onboarding/SKILL.md +62 -0
- package/skills/python-patterns/SKILL.md +441 -0
- package/skills/receiving-code-review/SKILL.md +120 -0
- package/skills/red-team-tactics/SKILL.md +199 -0
- package/skills/requesting-code-review/SKILL.md +67 -0
- package/skills/rust-pro/SKILL.md +176 -0
- package/skills/seo-fundamentals/SKILL.md +129 -0
- package/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/skills/server-management/SKILL.md +161 -0
- package/skills/subagent-driven-development/SKILL.md +76 -0
- package/skills/systematic-debugging/SKILL.md +109 -0
- package/skills/tailwind-patterns/SKILL.md +269 -0
- package/skills/tdd-workflow/SKILL.md +149 -0
- package/skills/testing-patterns/SKILL.md +178 -0
- package/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/skills/using-git-worktrees/SKILL.md +122 -0
- package/skills/verification-before-completion/SKILL.md +99 -0
- package/skills/vulnerability-scanner/SKILL.md +276 -0
- package/skills/vulnerability-scanner/checklists.md +121 -0
- package/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/skills/web-design-guidelines/SKILL.md +57 -0
- package/skills/webapp-testing/SKILL.md +187 -0
- package/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/skills/writing-skills/SKILL.md +110 -0
- package/workflows/brainstorm.md +113 -0
- package/workflows/create.md +59 -0
- package/workflows/debug.md +103 -0
- package/workflows/deploy.md +176 -0
- package/workflows/enhance.md +63 -0
- package/workflows/orchestrate.md +237 -0
- package/workflows/plan.md +89 -0
- package/workflows/preview.md +81 -0
- package/workflows/status.md +86 -0
- package/workflows/test.md +144 -0
- 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.*
|
package/mcp_config.json
ADDED
|
@@ -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
|
+
}
|
package/rules/GEMINI.md
ADDED
|
@@ -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()
|