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,120 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Session Manager - Antigravity Kit
4
+ =================================
5
+ Analyzes project state, detects tech stack, tracks file statistics, and provides
6
+ a summary of the current session.
7
+
8
+ Usage:
9
+ python .agent/scripts/session_manager.py status [path]
10
+ python .agent/scripts/session_manager.py info [path]
11
+ """
12
+
13
+ import os
14
+ import json
15
+ import argparse
16
+ from pathlib import Path
17
+ from typing import Dict, Any, List
18
+
19
+ def get_project_root(path: str) -> Path:
20
+ return Path(path).resolve()
21
+
22
+ def analyze_package_json(root: Path) -> Dict[str, Any]:
23
+ pkg_file = root / "package.json"
24
+ if not pkg_file.exists():
25
+ return {"type": "unknown", "dependencies": {}}
26
+
27
+ try:
28
+ with open(pkg_file, 'r', encoding='utf-8') as f:
29
+ data = json.load(f)
30
+
31
+ deps = data.get("dependencies", {})
32
+ dev_deps = data.get("devDependencies", {})
33
+ all_deps = {**deps, **dev_deps}
34
+
35
+ stack = []
36
+ if "next" in all_deps: stack.append("Next.js")
37
+ elif "react" in all_deps: stack.append("React")
38
+ elif "vue" in all_deps: stack.append("Vue")
39
+ elif "svelte" in all_deps: stack.append("Svelte")
40
+ elif "express" in all_deps: stack.append("Express")
41
+ elif "nestjs" in all_deps or "@nestjs/core" in all_deps: stack.append("NestJS")
42
+
43
+ if "tailwindcss" in all_deps: stack.append("Tailwind CSS")
44
+ if "prisma" in all_deps: stack.append("Prisma")
45
+ if "typescript" in all_deps: stack.append("TypeScript")
46
+
47
+ return {
48
+ "name": data.get("name", "unnamed"),
49
+ "version": data.get("version", "0.0.0"),
50
+ "stack": stack,
51
+ "scripts": list(data.get("scripts", {}).keys())
52
+ }
53
+ except Exception as e:
54
+ return {"error": str(e)}
55
+
56
+ def count_files(root: Path) -> Dict[str, int]:
57
+ stats = {"created": 0, "modified": 0, "total": 0}
58
+ # Simple count for now, comprehensive tracking would require git diff or extensive history
59
+ exclude = {".git", "node_modules", ".next", "dist", "build", ".agent", ".gemini", "__pycache__"}
60
+
61
+ for root_dir, dirs, files in os.walk(root):
62
+ dirs[:] = [d for d in dirs if d not in exclude]
63
+ stats["total"] += len(files)
64
+
65
+ return stats
66
+
67
+ def detect_features(root: Path) -> List[str]:
68
+ # Heuristic: look at folder names in src/
69
+ features = []
70
+ src = root / "src"
71
+ if src.exists():
72
+ possible_dirs = ["components", "modules", "features", "app", "pages", "services"]
73
+ for d in possible_dirs:
74
+ p = src / d
75
+ if p.exists() and p.is_dir():
76
+ # List subdirectories as likely features
77
+ for child in p.iterdir():
78
+ if child.is_dir():
79
+ features.append(child.name)
80
+ return features[:10] # Limit to top 10
81
+
82
+ def print_status(root: Path):
83
+ info = analyze_package_json(root)
84
+ stats = count_files(root)
85
+ features = detect_features(root)
86
+
87
+ print("\n=== Project Status ===")
88
+ print(f"\n📁 Project: {info.get('name', root.name)}")
89
+ print(f"📂 Path: {root}")
90
+ print(f"🏷️ Type: {', '.join(info.get('stack', ['Generic']))}")
91
+ print(f"📊 Status: Active")
92
+
93
+ print("\n🔧 Tech Stack:")
94
+ for tech in info.get('stack', []):
95
+ print(f" • {tech}")
96
+
97
+ print(f"\n✅ Detected Modules/Features ({len(features)}):")
98
+ for feat in features:
99
+ print(f" • {feat}")
100
+ if not features:
101
+ print(" (No distinct feature modules detected)")
102
+
103
+ print(f"\n📄 Files: {stats['total']} total files tracked")
104
+ print("\n====================\n")
105
+
106
+ def main():
107
+ parser = argparse.ArgumentParser(description="Session Manager")
108
+ parser.add_argument("command", choices=["status", "info"], help="Command to run")
109
+ parser.add_argument("path", nargs="?", default=".", help="Project path")
110
+
111
+ args = parser.parse_args()
112
+ root = get_project_root(args.path)
113
+
114
+ if args.command == "status":
115
+ print_status(root)
116
+ elif args.command == "info":
117
+ print(json.dumps(analyze_package_json(root), indent=2))
118
+
119
+ if __name__ == "__main__":
120
+ main()
@@ -0,0 +1,327 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Full Verification Suite - Antigravity Kit
4
+ ==========================================
5
+
6
+ Runs COMPLETE validation including all checks + performance + E2E.
7
+ Use this before deployment or major releases.
8
+
9
+ Usage:
10
+ python scripts/verify_all.py . --url <URL>
11
+
12
+ Includes ALL checks:
13
+ ✅ Security Scan (OWASP, secrets, dependencies)
14
+ ✅ Lint & Type Coverage
15
+ ✅ Schema Validation
16
+ ✅ Test Suite (unit + integration)
17
+ ✅ UX Audit (psychology, accessibility)
18
+ ✅ SEO Check
19
+ ✅ Lighthouse (Core Web Vitals)
20
+ ✅ Playwright E2E
21
+ ✅ Bundle Analysis (if applicable)
22
+ ✅ Mobile Audit (if applicable)
23
+ """
24
+
25
+ import sys
26
+ import subprocess
27
+ import argparse
28
+ from pathlib import Path
29
+ from typing import List, Dict, Optional
30
+ from datetime import datetime
31
+
32
+ # ANSI colors
33
+ class Colors:
34
+ HEADER = '\033[95m'
35
+ BLUE = '\033[94m'
36
+ CYAN = '\033[96m'
37
+ GREEN = '\033[92m'
38
+ YELLOW = '\033[93m'
39
+ RED = '\033[91m'
40
+ ENDC = '\033[0m'
41
+ BOLD = '\033[1m'
42
+
43
+ def print_header(text: str):
44
+ print(f"\n{Colors.BOLD}{Colors.CYAN}{'='*70}{Colors.ENDC}")
45
+ print(f"{Colors.BOLD}{Colors.CYAN}{text.center(70)}{Colors.ENDC}")
46
+ print(f"{Colors.BOLD}{Colors.CYAN}{'='*70}{Colors.ENDC}\n")
47
+
48
+ def print_step(text: str):
49
+ print(f"{Colors.BOLD}{Colors.BLUE}🔄 {text}{Colors.ENDC}")
50
+
51
+ def print_success(text: str):
52
+ print(f"{Colors.GREEN}✅ {text}{Colors.ENDC}")
53
+
54
+ def print_warning(text: str):
55
+ print(f"{Colors.YELLOW}⚠️ {text}{Colors.ENDC}")
56
+
57
+ def print_error(text: str):
58
+ print(f"{Colors.RED}❌ {text}{Colors.ENDC}")
59
+
60
+ # Complete verification suite
61
+ VERIFICATION_SUITE = [
62
+ # P0: Security (CRITICAL)
63
+ {
64
+ "category": "Security",
65
+ "checks": [
66
+ ("Security Scan", ".agent/skills/vulnerability-scanner/scripts/security_scan.py", True),
67
+ ("Dependency Analysis", ".agent/skills/vulnerability-scanner/scripts/dependency_analyzer.py", False),
68
+ ]
69
+ },
70
+
71
+ # P1: Code Quality (CRITICAL)
72
+ {
73
+ "category": "Code Quality",
74
+ "checks": [
75
+ ("Lint Check", ".agent/skills/lint-and-validate/scripts/lint_runner.py", True),
76
+ ("Type Coverage", ".agent/skills/lint-and-validate/scripts/type_coverage.py", False),
77
+ ]
78
+ },
79
+
80
+ # P2: Data Layer
81
+ {
82
+ "category": "Data Layer",
83
+ "checks": [
84
+ ("Schema Validation", ".agent/skills/database-design/scripts/schema_validator.py", False),
85
+ ]
86
+ },
87
+
88
+ # P3: Testing
89
+ {
90
+ "category": "Testing",
91
+ "checks": [
92
+ ("Test Suite", ".agent/skills/testing-patterns/scripts/test_runner.py", False),
93
+ ]
94
+ },
95
+
96
+ # P4: UX & Accessibility
97
+ {
98
+ "category": "UX & Accessibility",
99
+ "checks": [
100
+ ("UX Audit", ".agent/skills/frontend-design/scripts/ux_audit.py", False),
101
+ ("Accessibility Check", ".agent/skills/frontend-design/scripts/accessibility_checker.py", False),
102
+ ]
103
+ },
104
+
105
+ # P5: SEO & Content
106
+ {
107
+ "category": "SEO & Content",
108
+ "checks": [
109
+ ("SEO Check", ".agent/skills/seo-fundamentals/scripts/seo_checker.py", False),
110
+ ("GEO Check", ".agent/skills/geo-fundamentals/scripts/geo_checker.py", False),
111
+ ]
112
+ },
113
+
114
+ # P6: Performance (requires URL)
115
+ {
116
+ "category": "Performance",
117
+ "requires_url": True,
118
+ "checks": [
119
+ ("Lighthouse Audit", ".agent/skills/performance-profiling/scripts/lighthouse_audit.py", True),
120
+ ("Bundle Analysis", ".agent/skills/performance-profiling/scripts/bundle_analyzer.py", False),
121
+ ]
122
+ },
123
+
124
+ # P7: E2E Testing (requires URL)
125
+ {
126
+ "category": "E2E Testing",
127
+ "requires_url": True,
128
+ "checks": [
129
+ ("Playwright E2E", ".agent/skills/webapp-testing/scripts/playwright_runner.py", False),
130
+ ]
131
+ },
132
+
133
+ # P8: Mobile (if applicable)
134
+ {
135
+ "category": "Mobile",
136
+ "checks": [
137
+ ("Mobile Audit", ".agent/skills/mobile-design/scripts/mobile_audit.py", False),
138
+ ]
139
+ },
140
+
141
+ # P9: Internationalization
142
+ {
143
+ "category": "Internationalization",
144
+ "checks": [
145
+ ("i18n Check", ".agent/skills/i18n-localization/scripts/i18n_checker.py", False),
146
+ ]
147
+ },
148
+ ]
149
+
150
+ def run_script(name: str, script_path: Path, project_path: str, url: Optional[str] = None) -> dict:
151
+ """Run validation script"""
152
+ if not script_path.exists():
153
+ print_warning(f"{name}: Script not found, skipping")
154
+ return {"name": name, "passed": True, "skipped": True, "duration": 0}
155
+
156
+ print_step(f"Running: {name}")
157
+ start_time = datetime.now()
158
+
159
+ # Build command
160
+ cmd = ["python", str(script_path), project_path]
161
+ if url and ("lighthouse" in script_path.name.lower() or "playwright" in script_path.name.lower()):
162
+ cmd.append(url)
163
+
164
+ # Run
165
+ try:
166
+ result = subprocess.run(
167
+ cmd,
168
+ capture_output=True,
169
+ text=True,
170
+ timeout=600 # 10 minute timeout for slow checks
171
+ )
172
+
173
+ duration = (datetime.now() - start_time).total_seconds()
174
+ passed = result.returncode == 0
175
+
176
+ if passed:
177
+ print_success(f"{name}: PASSED ({duration:.1f}s)")
178
+ else:
179
+ print_error(f"{name}: FAILED ({duration:.1f}s)")
180
+ if result.stderr:
181
+ print(f" {result.stderr[:300]}")
182
+
183
+ return {
184
+ "name": name,
185
+ "passed": passed,
186
+ "output": result.stdout,
187
+ "error": result.stderr,
188
+ "skipped": False,
189
+ "duration": duration
190
+ }
191
+
192
+ except subprocess.TimeoutExpired:
193
+ duration = (datetime.now() - start_time).total_seconds()
194
+ print_error(f"{name}: TIMEOUT (>{duration:.0f}s)")
195
+ return {"name": name, "passed": False, "skipped": False, "duration": duration, "error": "Timeout"}
196
+
197
+ except Exception as e:
198
+ duration = (datetime.now() - start_time).total_seconds()
199
+ print_error(f"{name}: ERROR - {str(e)}")
200
+ return {"name": name, "passed": False, "skipped": False, "duration": duration, "error": str(e)}
201
+
202
+ def print_final_report(results: List[dict], start_time: datetime):
203
+ """Print comprehensive final report"""
204
+ total_duration = (datetime.now() - start_time).total_seconds()
205
+
206
+ print_header("📊 FULL VERIFICATION REPORT")
207
+
208
+ # Statistics
209
+ total = len(results)
210
+ passed = sum(1 for r in results if r["passed"] and not r.get("skipped"))
211
+ failed = sum(1 for r in results if not r["passed"] and not r.get("skipped"))
212
+ skipped = sum(1 for r in results if r.get("skipped"))
213
+
214
+ print(f"Total Duration: {total_duration:.1f}s")
215
+ print(f"Total Checks: {total}")
216
+ print(f"{Colors.GREEN}✅ Passed: {passed}{Colors.ENDC}")
217
+ print(f"{Colors.RED}❌ Failed: {failed}{Colors.ENDC}")
218
+ print(f"{Colors.YELLOW}⏭️ Skipped: {skipped}{Colors.ENDC}")
219
+ print()
220
+
221
+ # Category breakdown
222
+ print(f"{Colors.BOLD}Results by Category:{Colors.ENDC}")
223
+ current_category = None
224
+ for r in results:
225
+ # Print category header if changed
226
+ if r.get("category") and r["category"] != current_category:
227
+ current_category = r["category"]
228
+ print(f"\n{Colors.BOLD}{Colors.CYAN}{current_category}:{Colors.ENDC}")
229
+
230
+ # Print result
231
+ if r.get("skipped"):
232
+ status = f"{Colors.YELLOW}⏭️ {Colors.ENDC}"
233
+ elif r["passed"]:
234
+ status = f"{Colors.GREEN}✅{Colors.ENDC}"
235
+ else:
236
+ status = f"{Colors.RED}❌{Colors.ENDC}"
237
+
238
+ duration_str = f"({r.get('duration', 0):.1f}s)" if not r.get("skipped") else ""
239
+ print(f" {status} {r['name']} {duration_str}")
240
+
241
+ print()
242
+
243
+ # Failed checks detail
244
+ if failed > 0:
245
+ print(f"{Colors.BOLD}{Colors.RED}❌ FAILED CHECKS:{Colors.ENDC}")
246
+ for r in results:
247
+ if not r["passed"] and not r.get("skipped"):
248
+ print(f"\n{Colors.RED}✗ {r['name']}{Colors.ENDC}")
249
+ if r.get("error"):
250
+ error_preview = r["error"][:200]
251
+ print(f" Error: {error_preview}")
252
+ print()
253
+
254
+ # Final verdict
255
+ if failed > 0:
256
+ print_error(f"VERIFICATION FAILED - {failed} check(s) need attention")
257
+ print(f"\n{Colors.YELLOW}💡 Tip: Fix critical (security, lint) issues first{Colors.ENDC}")
258
+ return False
259
+ else:
260
+ print_success("✨ ALL CHECKS PASSED - Ready for deployment! ✨")
261
+ return True
262
+
263
+ def main():
264
+ parser = argparse.ArgumentParser(
265
+ description="Run complete Antigravity Kit verification suite",
266
+ formatter_class=argparse.RawDescriptionHelpFormatter,
267
+ epilog="""
268
+ Examples:
269
+ python scripts/verify_all.py . --url http://localhost:3000
270
+ python scripts/verify_all.py . --url https://staging.example.com --no-e2e
271
+ """
272
+ )
273
+ parser.add_argument("project", help="Project path to validate")
274
+ parser.add_argument("--url", required=True, help="URL for performance & E2E checks")
275
+ parser.add_argument("--no-e2e", action="store_true", help="Skip E2E tests")
276
+ parser.add_argument("--stop-on-fail", action="store_true", help="Stop on first failure")
277
+
278
+ args = parser.parse_args()
279
+
280
+ project_path = Path(args.project).resolve()
281
+
282
+ if not project_path.exists():
283
+ print_error(f"Project path does not exist: {project_path}")
284
+ sys.exit(1)
285
+
286
+ print_header("🚀 ANTIGRAVITY KIT - FULL VERIFICATION SUITE")
287
+ print(f"Project: {project_path}")
288
+ print(f"URL: {args.url}")
289
+ print(f"Started: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
290
+
291
+ start_time = datetime.now()
292
+ results = []
293
+
294
+ # Run all verification categories
295
+ for suite in VERIFICATION_SUITE:
296
+ category = suite["category"]
297
+ requires_url = suite.get("requires_url", False)
298
+
299
+ # Skip if requires URL and not provided
300
+ if requires_url and not args.url:
301
+ continue
302
+
303
+ # Skip E2E if flag set
304
+ if args.no_e2e and category == "E2E Testing":
305
+ continue
306
+
307
+ print_header(f"📋 {category.upper()}")
308
+
309
+ for name, script_path, required in suite["checks"]:
310
+ script = project_path / script_path
311
+ result = run_script(name, script, str(project_path), args.url)
312
+ result["category"] = category
313
+ results.append(result)
314
+
315
+ # Stop on critical failure if flag set
316
+ if args.stop_on_fail and required and not result["passed"] and not result.get("skipped"):
317
+ print_error(f"CRITICAL: {name} failed. Stopping verification.")
318
+ print_final_report(results, start_time)
319
+ sys.exit(1)
320
+
321
+ # Print final report
322
+ all_passed = print_final_report(results, start_time)
323
+
324
+ sys.exit(0 if all_passed else 1)
325
+
326
+ if __name__ == "__main__":
327
+ main()
@@ -0,0 +1,156 @@
1
+ ---
2
+ name: api-design
3
+ description: REST API design patterns. Use when designing new API endpoints, reviewing API contracts, choosing pagination strategies, error response formats, versioning, or HTTP status codes.
4
+ allowed-tools: Read, Edit, Write
5
+ ---
6
+
7
+ # API Design Patterns
8
+
9
+ ## URL Structure
10
+
11
+ ```
12
+ # Resources: plural nouns, lowercase, kebab-case, no verbs
13
+ GET /api/v1/users
14
+ POST /api/v1/users
15
+ GET /api/v1/users/:id
16
+ PUT /api/v1/users/:id
17
+ PATCH /api/v1/users/:id
18
+ DELETE /api/v1/users/:id
19
+
20
+ # Sub-resources for relationships
21
+ GET /api/v1/users/:id/orders
22
+ POST /api/v1/users/:id/orders
23
+
24
+ # Actions that don't map to CRUD
25
+ POST /api/v1/orders/:id/cancel
26
+ POST /api/v1/auth/refresh
27
+ ```
28
+
29
+ **Naming rules:**
30
+ ```
31
+ ✅ /api/v1/team-members kebab-case
32
+ ✅ /api/v1/orders?status=active query params for filtering
33
+ ✅ /api/v1/users/123/orders nested for ownership
34
+
35
+ ❌ /api/v1/getUsers verb in URL
36
+ ❌ /api/v1/user singular
37
+ ❌ /api/v1/team_members snake_case in URLs
38
+ ```
39
+
40
+ ## HTTP Methods and Status Codes
41
+
42
+ | Method | Idempotent | Use For |
43
+ |--------|-----------|---------|
44
+ | GET | Yes | Retrieve |
45
+ | POST | No | Create / trigger actions |
46
+ | PUT | Yes | Full replacement |
47
+ | PATCH | No | Partial update |
48
+ | DELETE | Yes | Remove |
49
+
50
+ ```
51
+ # Success
52
+ 200 OK GET, PUT, PATCH (with body)
53
+ 201 Created POST (add Location header)
54
+ 204 No Content DELETE, PUT (no body)
55
+
56
+ # Client Errors
57
+ 400 Bad Request Validation failure, malformed JSON
58
+ 401 Unauthorized Missing or invalid auth
59
+ 403 Forbidden Authenticated, not authorized
60
+ 404 Not Found Resource doesn't exist
61
+ 409 Conflict Duplicate entry, state conflict
62
+ 422 Unprocessable Entity Valid JSON, semantically invalid
63
+ 429 Too Many Requests Rate limit exceeded
64
+
65
+ # Server Errors
66
+ 500 Internal Server Error Never expose internal details
67
+ 503 Service Unavailable Include Retry-After header
68
+ ```
69
+
70
+ ## Response Format
71
+
72
+ ```json
73
+ // Success
74
+ { "data": { "id": "abc-123", "email": "alice@example.com", "created_at": "2025-01-15T10:30:00Z" } }
75
+
76
+ // Collection with pagination
77
+ {
78
+ "data": [{ "id": "abc-123", "name": "Alice" }],
79
+ "meta": { "total": 142, "page": 1, "per_page": 20, "total_pages": 8 },
80
+ "links": { "next": "/api/v1/users?page=2&per_page=20" }
81
+ }
82
+
83
+ // Error
84
+ {
85
+ "error": {
86
+ "code": "validation_error",
87
+ "message": "Request validation failed",
88
+ "details": [
89
+ { "field": "email", "message": "Must be a valid email", "code": "invalid_format" }
90
+ ]
91
+ }
92
+ }
93
+ ```
94
+
95
+ ## Pagination
96
+
97
+ | Use Case | Type |
98
+ |----------|------|
99
+ | Admin dashboards, small datasets (<10K) | Offset |
100
+ | Infinite scroll, feeds, large datasets | **Cursor** |
101
+ | Public APIs | Cursor (default) |
102
+ | Search results | Offset (users expect page numbers) |
103
+
104
+ ```
105
+ # Offset
106
+ GET /api/v1/users?page=2&per_page=20
107
+
108
+ # Cursor
109
+ GET /api/v1/users?cursor=eyJpZCI6MTIzfQ&limit=20
110
+ → { "data": [...], "meta": { "has_next": true, "next_cursor": "eyJpZCI6MTQzfQ" } }
111
+ ```
112
+
113
+ ## Versioning
114
+
115
+ ```
116
+ /api/v1/users ← recommended
117
+ /api/v2/users ← when breaking changes needed
118
+ ```
119
+
120
+ **Breaking changes** (require new version): removing fields, changing types, changing URL structure.
121
+ **Non-breaking** (no new version): adding optional fields/params, adding endpoints.
122
+
123
+ Deprecation: 6-month notice, add `Sunset` header, return `410 Gone` after.
124
+
125
+ ## Filtering, Sorting, Search
126
+
127
+ ```
128
+ GET /api/v1/orders?status=active&created_after=2025-01-01
129
+ GET /api/v1/users?sort=created_at&order=desc
130
+ GET /api/v1/products?q=widget
131
+ GET /api/v1/users?fields=id,email,name # Sparse fieldsets
132
+ ```
133
+
134
+ ## Rate Limiting Headers
135
+
136
+ ```
137
+ X-RateLimit-Limit: 100
138
+ X-RateLimit-Remaining: 45
139
+ X-RateLimit-Reset: 1640995200
140
+ Retry-After: 30 # on 429
141
+ ```
142
+
143
+ ## API Design Checklist
144
+
145
+ Before shipping a new endpoint:
146
+
147
+ - [ ] URL: plural noun, kebab-case, no verbs
148
+ - [ ] Correct HTTP method and status code
149
+ - [ ] Input validated with schema (Zod, Pydantic, Go validator)
150
+ - [ ] Error response follows standard format with field-level details
151
+ - [ ] Pagination implemented for list endpoints
152
+ - [ ] Authentication required (or explicitly marked public)
153
+ - [ ] Authorization checked (user can only access their own resources)
154
+ - [ ] Rate limiting configured
155
+ - [ ] Response does not leak internal details (stack traces, SQL errors)
156
+ - [ ] OpenAPI spec updated
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: api-patterns
3
+ description: API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.
4
+ allowed-tools: Read, Write, Edit, Glob, Grep
5
+ ---
6
+
7
+ # API Patterns
8
+
9
+ > API design principles and decision-making for 2025.
10
+ > **Learn to THINK, not copy fixed patterns.**
11
+
12
+ ## 🎯 Selective Reading Rule
13
+
14
+ **Read ONLY files relevant to the request!** Check the content map, find what you need.
15
+
16
+ ---
17
+
18
+ ## 📑 Content Map
19
+
20
+ | File | Description | When to Read |
21
+ |------|-------------|--------------|
22
+ | `api-style.md` | REST vs GraphQL vs tRPC decision tree | Choosing API type |
23
+ | `rest.md` | Resource naming, HTTP methods, status codes | Designing REST API |
24
+ | `response.md` | Envelope pattern, error format, pagination | Response structure |
25
+ | `graphql.md` | Schema design, when to use, security | Considering GraphQL |
26
+ | `trpc.md` | TypeScript monorepo, type safety | TS fullstack projects |
27
+ | `versioning.md` | URI/Header/Query versioning | API evolution planning |
28
+ | `auth.md` | JWT, OAuth, Passkey, API Keys | Auth pattern selection |
29
+ | `rate-limiting.md` | Token bucket, sliding window | API protection |
30
+ | `documentation.md` | OpenAPI/Swagger best practices | Documentation |
31
+ | `security-testing.md` | OWASP API Top 10, auth/authz testing | Security audits |
32
+
33
+ ---
34
+
35
+ ## 🔗 Related Skills
36
+
37
+ | Need | Skill |
38
+ |------|-------|
39
+ | API implementation | `@[skills/backend-development]` |
40
+ | Data structure | `@[skills/database-design]` |
41
+ | Security details | `@[skills/security-hardening]` |
42
+
43
+ ---
44
+
45
+ ## ✅ Decision Checklist
46
+
47
+ Before designing an API:
48
+
49
+ - [ ] **Asked user about API consumers?**
50
+ - [ ] **Chosen API style for THIS context?** (REST/GraphQL/tRPC)
51
+ - [ ] **Defined consistent response format?**
52
+ - [ ] **Planned versioning strategy?**
53
+ - [ ] **Considered authentication needs?**
54
+ - [ ] **Planned rate limiting?**
55
+ - [ ] **Documentation approach defined?**
56
+
57
+ ---
58
+
59
+ ## ❌ Anti-Patterns
60
+
61
+ **DON'T:**
62
+ - Default to REST for everything
63
+ - Use verbs in REST endpoints (/getUsers)
64
+ - Return inconsistent response formats
65
+ - Expose internal errors to clients
66
+ - Skip rate limiting
67
+
68
+ **DO:**
69
+ - Choose API style based on context
70
+ - Ask about client requirements
71
+ - Document thoroughly
72
+ - Use appropriate status codes
73
+
74
+ ---
75
+
76
+ ## Script
77
+
78
+ | Script | Purpose | Command |
79
+ |--------|---------|---------|
80
+ | `scripts/api_validator.py` | API endpoint validation | `python scripts/api_validator.py <project_path>` |
81
+