@mrtrinhvn/ag-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/bin/cli.js +88 -0
- package/package.json +28 -0
- package/template/.agent/agents/backend-specialist.md +263 -0
- package/template/.agent/agents/code-archaeologist.md +106 -0
- package/template/.agent/agents/database-architect.md +226 -0
- package/template/.agent/agents/debugger.md +225 -0
- package/template/.agent/agents/devops-engineer.md +242 -0
- package/template/.agent/agents/documentation-writer.md +104 -0
- package/template/.agent/agents/explorer-agent.md +73 -0
- package/template/.agent/agents/frontend-specialist.md +556 -0
- package/template/.agent/agents/game-developer.md +162 -0
- package/template/.agent/agents/mobile-developer.md +377 -0
- package/template/.agent/agents/orchestrator.md +416 -0
- package/template/.agent/agents/penetration-tester.md +188 -0
- package/template/.agent/agents/performance-optimizer.md +187 -0
- package/template/.agent/agents/product-manager.md +112 -0
- package/template/.agent/agents/product-owner.md +95 -0
- package/template/.agent/agents/project-planner.md +406 -0
- package/template/.agent/agents/qa-automation-engineer.md +103 -0
- package/template/.agent/agents/quant-architect.md +31 -0
- package/template/.agent/agents/security-auditor.md +170 -0
- package/template/.agent/agents/seo-specialist.md +111 -0
- package/template/.agent/agents/test-engineer.md +158 -0
- package/template/.agent/knowledge/.gitkeep +0 -0
- package/template/.agent/rules/GEMINI.md +280 -0
- package/template/.agent/scripts/auto_preview.py +148 -0
- package/template/.agent/scripts/checklist.py +217 -0
- package/template/.agent/scripts/session_manager.py +120 -0
- package/template/.agent/scripts/verify_all.py +327 -0
- package/template/.agent/skills/api-patterns/SKILL.md +81 -0
- package/template/.agent/skills/api-patterns/api-style.md +42 -0
- package/template/.agent/skills/api-patterns/auth.md +24 -0
- package/template/.agent/skills/api-patterns/documentation.md +26 -0
- package/template/.agent/skills/api-patterns/graphql.md +41 -0
- package/template/.agent/skills/api-patterns/rate-limiting.md +31 -0
- package/template/.agent/skills/api-patterns/response.md +37 -0
- package/template/.agent/skills/api-patterns/rest.md +40 -0
- package/template/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
- package/template/.agent/skills/api-patterns/security-testing.md +122 -0
- package/template/.agent/skills/api-patterns/trpc.md +41 -0
- package/template/.agent/skills/api-patterns/versioning.md +22 -0
- package/template/.agent/skills/app-builder/SKILL.md +75 -0
- package/template/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/template/.agent/skills/app-builder/feature-building.md +53 -0
- package/template/.agent/skills/app-builder/project-detection.md +34 -0
- package/template/.agent/skills/app-builder/scaffolding.md +118 -0
- package/template/.agent/skills/app-builder/tech-stack.md +40 -0
- package/template/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/template/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/template/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/template/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/template/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/template/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/template/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/template/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/template/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/template/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/template/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/template/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/template/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/template/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/template/.agent/skills/architecture/SKILL.md +55 -0
- package/template/.agent/skills/architecture/context-discovery.md +43 -0
- package/template/.agent/skills/architecture/examples.md +94 -0
- package/template/.agent/skills/architecture/pattern-selection.md +68 -0
- package/template/.agent/skills/architecture/patterns-reference.md +50 -0
- package/template/.agent/skills/architecture/trade-off-analysis.md +77 -0
- package/template/.agent/skills/bash-linux/SKILL.md +199 -0
- package/template/.agent/skills/behavioral-modes/SKILL.md +242 -0
- package/template/.agent/skills/brainstorming/SKILL.md +168 -0
- package/template/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
- package/template/.agent/skills/business-ops/SKILL.md +26 -0
- package/template/.agent/skills/clean-code/SKILL.md +202 -0
- package/template/.agent/skills/code-review-checklist/SKILL.md +109 -0
- package/template/.agent/skills/data-science/SKILL.md +28 -0
- package/template/.agent/skills/database-design/SKILL.md +52 -0
- package/template/.agent/skills/database-design/database-selection.md +43 -0
- package/template/.agent/skills/database-design/indexing.md +39 -0
- package/template/.agent/skills/database-design/migrations.md +48 -0
- package/template/.agent/skills/database-design/optimization.md +36 -0
- package/template/.agent/skills/database-design/orm-selection.md +30 -0
- package/template/.agent/skills/database-design/schema-design.md +56 -0
- package/template/.agent/skills/database-design/scripts/schema_validator.py +172 -0
- package/template/.agent/skills/deployment-procedures/SKILL.md +241 -0
- package/template/.agent/skills/doc.md +177 -0
- package/template/.agent/skills/documentation-templates/SKILL.md +194 -0
- package/template/.agent/skills/frontend-design/SKILL.md +418 -0
- package/template/.agent/skills/frontend-design/animation-guide.md +331 -0
- package/template/.agent/skills/frontend-design/color-system.md +311 -0
- package/template/.agent/skills/frontend-design/decision-trees.md +418 -0
- package/template/.agent/skills/frontend-design/motion-graphics.md +306 -0
- package/template/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/template/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/template/.agent/skills/frontend-design/typography-system.md +345 -0
- package/template/.agent/skills/frontend-design/ux-psychology.md +541 -0
- package/template/.agent/skills/frontend-design/visual-effects.md +383 -0
- package/template/.agent/skills/game-development/2d-games/SKILL.md +119 -0
- package/template/.agent/skills/game-development/3d-games/SKILL.md +135 -0
- package/template/.agent/skills/game-development/SKILL.md +167 -0
- package/template/.agent/skills/game-development/game-art/SKILL.md +185 -0
- package/template/.agent/skills/game-development/game-audio/SKILL.md +190 -0
- package/template/.agent/skills/game-development/game-design/SKILL.md +129 -0
- package/template/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
- package/template/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
- package/template/.agent/skills/game-development/pc-games/SKILL.md +144 -0
- package/template/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
- package/template/.agent/skills/game-development/web-games/SKILL.md +150 -0
- package/template/.agent/skills/geo-fundamentals/SKILL.md +156 -0
- package/template/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/template/.agent/skills/i18n-localization/SKILL.md +154 -0
- package/template/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/template/.agent/skills/intelligent-routing/SKILL.md +335 -0
- package/template/.agent/skills/knowledge-management/SKILL.md +54 -0
- package/template/.agent/skills/lint-and-validate/SKILL.md +45 -0
- package/template/.agent/skills/lint-and-validate/scripts/lint_runner.py +172 -0
- package/template/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/template/.agent/skills/mcp-builder/SKILL.md +176 -0
- package/template/.agent/skills/mobile-design/SKILL.md +394 -0
- package/template/.agent/skills/mobile-design/decision-trees.md +516 -0
- package/template/.agent/skills/mobile-design/mobile-backend.md +491 -0
- package/template/.agent/skills/mobile-design/mobile-color-system.md +420 -0
- package/template/.agent/skills/mobile-design/mobile-debugging.md +122 -0
- package/template/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/template/.agent/skills/mobile-design/mobile-navigation.md +458 -0
- package/template/.agent/skills/mobile-design/mobile-performance.md +767 -0
- package/template/.agent/skills/mobile-design/mobile-testing.md +356 -0
- package/template/.agent/skills/mobile-design/mobile-typography.md +433 -0
- package/template/.agent/skills/mobile-design/platform-android.md +666 -0
- package/template/.agent/skills/mobile-design/platform-ios.md +561 -0
- package/template/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/template/.agent/skills/mobile-design/touch-psychology.md +537 -0
- package/template/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
- package/template/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/template/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/template/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/template/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/template/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/template/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/template/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/template/.agent/skills/nextjs-react-expert/SKILL.md +267 -0
- package/template/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/template/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/template/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
- package/template/.agent/skills/parallel-agents/SKILL.md +175 -0
- package/template/.agent/skills/performance-profiling/SKILL.md +143 -0
- package/template/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/template/.agent/skills/plan-writing/SKILL.md +153 -0
- package/template/.agent/skills/powershell-windows/SKILL.md +167 -0
- package/template/.agent/skills/product-management/SKILL.md +30 -0
- package/template/.agent/skills/python-patterns/SKILL.md +441 -0
- package/template/.agent/skills/red-team-tactics/SKILL.md +199 -0
- package/template/.agent/skills/seo-fundamentals/SKILL.md +129 -0
- package/template/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/template/.agent/skills/server-management/SKILL.md +161 -0
- package/template/.agent/skills/systematic-debugging/SKILL.md +110 -0
- package/template/.agent/skills/tailwind-patterns/SKILL.md +269 -0
- package/template/.agent/skills/tdd-workflow/SKILL.md +148 -0
- package/template/.agent/skills/testing-patterns/SKILL.md +178 -0
- package/template/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/template/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
- package/template/.agent/skills/vulnerability-scanner/checklists.md +121 -0
- package/template/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/template/.agent/skills/web-design-guidelines/SKILL.md +57 -0
- package/template/.agent/skills/webapp-testing/SKILL.md +187 -0
- package/template/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/template/.agent/workflows/brainstorm.md +113 -0
- package/template/.agent/workflows/create.md +59 -0
- package/template/.agent/workflows/debug.md +103 -0
- package/template/.agent/workflows/deploy.md +176 -0
- package/template/.agent/workflows/enhance.md +63 -0
- package/template/.agent/workflows/orchestrate.md +237 -0
- package/template/.agent/workflows/plan.md +89 -0
- package/template/.agent/workflows/preview.md +81 -0
- package/template/.agent/workflows/status.md +86 -0
- package/template/.agent/workflows/test.md +144 -0
- package/template/.agent/workflows/ui-ux-pro-max.md +296 -0
|
@@ -0,0 +1,280 @@
|
|
|
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
|
+
---
|
|
@@ -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()
|
|
@@ -0,0 +1,217 @@
|
|
|
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()
|