From 17609d3e6e59c1a6c6efa0d52aa4460d5fb2593c Mon Sep 17 00:00:00 2001 From: Interpool Date: Fri, 30 Jan 2026 19:03:29 +0530 Subject: [PATCH] feat: include weekday in system prompt and add zh-CN tool display (#4629, #4631) --- .../antigravity-kit/api-patterns/SKILL.md | 81 + .../antigravity-kit/api-patterns/api-style.md | 42 + .../antigravity-kit/api-patterns/auth.md | 24 + .../api-patterns/documentation.md | 26 + .../antigravity-kit/api-patterns/graphql.md | 41 + .../api-patterns/rate-limiting.md | 31 + .../antigravity-kit/api-patterns/response.md | 37 + .../antigravity-kit/api-patterns/rest.md | 40 + .../api-patterns/security-testing.md | 122 + .../antigravity-kit/api-patterns/trpc.md | 41 + .../api-patterns/versioning.md | 22 + .../antigravity-kit/app-builder/SKILL.md | 75 + .../app-builder/agent-coordination.md | 71 + .../app-builder/feature-building.md | 53 + .../app-builder/project-detection.md | 34 + .../app-builder/scaffolding.md | 118 + .../antigravity-kit/app-builder/tech-stack.md | 40 + .../app-builder/templates/SKILL.md | 39 + .../templates/astro-static/TEMPLATE.md | 76 + .../templates/chrome-extension/TEMPLATE.md | 92 + .../templates/cli-tool/TEMPLATE.md | 88 + .../templates/electron-desktop/TEMPLATE.md | 88 + .../templates/express-api/TEMPLATE.md | 83 + .../templates/flutter-app/TEMPLATE.md | 90 + .../templates/monorepo-turborepo/TEMPLATE.md | 90 + .../templates/nextjs-fullstack/TEMPLATE.md | 82 + .../templates/nextjs-saas/TEMPLATE.md | 100 + .../templates/nextjs-static/TEMPLATE.md | 106 + .../templates/nuxt-app/TEMPLATE.md | 101 + .../templates/python-fastapi/TEMPLATE.md | 83 + .../templates/react-native-app/TEMPLATE.md | 93 + .../antigravity-kit/architecture/SKILL.md | 55 + .../architecture/context-discovery.md | 43 + .../antigravity-kit/architecture/examples.md | 94 + .../architecture/pattern-selection.md | 68 + .../architecture/patterns-reference.md | 50 + .../architecture/trade-off-analysis.md | 77 + .../antigravity-kit/bash-linux/SKILL.md | 199 + .../antigravity-kit/behavioral-modes/SKILL.md | 242 + .../antigravity-kit/brainstorming/SKILL.md | 163 + .../brainstorming/dynamic-questioning.md | 350 + .../antigravity-kit/clean-code/SKILL.md | 201 + .../code-review-checklist/SKILL.md | 109 + .../antigravity-kit/database-design/SKILL.md | 52 + .../database-design/database-selection.md | 43 + .../database-design/indexing.md | 39 + .../database-design/migrations.md | 48 + .../database-design/optimization.md | 36 + .../database-design/orm-selection.md | 30 + .../database-design/schema-design.md | 56 + .../deployment-procedures/SKILL.md | 241 + .agent/skills/antigravity-kit/doc.md | 177 + .../antigravity-kit/docker-expert/SKILL.md | 409 + .../documentation-templates/SKILL.md | 194 + .../antigravity-kit/frontend-design/SKILL.md | 396 + .../frontend-design/animation-guide.md | 331 + .../frontend-design/color-system.md | 311 + .../frontend-design/decision-trees.md | 418 + .../frontend-design/motion-graphics.md | 306 + .../frontend-design/typography-system.md | 345 + .../frontend-design/ux-psychology.md | 541 + .../frontend-design/visual-effects.md | 383 + .../game-development/2d-games/SKILL.md | 119 + .../game-development/3d-games/SKILL.md | 135 + .../antigravity-kit/game-development/SKILL.md | 167 + .../game-development/game-art/SKILL.md | 185 + .../game-development/game-audio/SKILL.md | 190 + .../game-development/game-design/SKILL.md | 129 + .../game-development/mobile-games/SKILL.md | 108 + .../game-development/multiplayer/SKILL.md | 132 + .../game-development/pc-games/SKILL.md | 144 + .../game-development/vr-ar/SKILL.md | 123 + .../game-development/web-games/SKILL.md | 150 + .../antigravity-kit/geo-fundamentals/SKILL.md | 156 + .../i18n-localization/SKILL.md | 154 + .../lint-and-validate/SKILL.md | 45 + .../antigravity-kit/mcp-builder/SKILL.md | 176 + .../antigravity-kit/mobile-design/SKILL.md | 394 + .../mobile-design/decision-trees.md | 516 + .../mobile-design/mobile-backend.md | 491 + .../mobile-design/mobile-color-system.md | 420 + .../mobile-design/mobile-debugging.md | 122 + .../mobile-design/mobile-design-thinking.md | 357 + .../mobile-design/mobile-navigation.md | 458 + .../mobile-design/mobile-performance.md | 767 + .../mobile-design/mobile-testing.md | 356 + .../mobile-design/mobile-typography.md | 433 + .../mobile-design/platform-android.md | 666 + .../mobile-design/platform-ios.md | 561 + .../mobile-design/touch-psychology.md | 537 + .../antigravity-kit/nestjs-expert/SKILL.md | 552 + .../nextjs-best-practices/SKILL.md | 203 + .../nodejs-best-practices/SKILL.md | 333 + .../antigravity-kit/parallel-agents/SKILL.md | 175 + .../performance-profiling/SKILL.md | 143 + .../antigravity-kit/plan-writing/SKILL.md | 152 + .../powershell-windows/SKILL.md | 167 + .agent/skills/heygen/SKILL.md | 43 + .agent/skills/heygen/rules/assets.md | 353 + .agent/skills/heygen/rules/authentication.md | 234 + .agent/skills/heygen/rules/avatars.md | 721 + .agent/skills/heygen/rules/backgrounds.md | 297 + .agent/skills/heygen/rules/captions.md | 298 + .agent/skills/heygen/rules/dimensions.md | 316 + .agent/skills/heygen/rules/photo-avatars.md | 560 + .agent/skills/heygen/rules/quota.md | 197 + .../heygen/rules/remotion-integration.md | 707 + .agent/skills/heygen/rules/scripts.md | 324 + .../skills/heygen/rules/streaming-avatars.md | 468 + .agent/skills/heygen/rules/templates.md | 435 + .agent/skills/heygen/rules/text-overlays.md | 318 + .agent/skills/heygen/rules/video-agent.md | 346 + .../skills/heygen/rules/video-generation.md | 753 + .agent/skills/heygen/rules/video-status.md | 480 + .../skills/heygen/rules/video-translation.md | 437 + .agent/skills/heygen/rules/voices.md | 507 + .agent/skills/heygen/rules/webhooks.md | 395 + .agent/skills/karpathy-guidelines/SKILL.md | 61 + .gitignore | 3 + heyclaw/contrubuting-openclaw.md | 69 + package-lock.json | 13310 ++++++++++++++++ src/agents/system-prompt.test.ts | 1 + src/agents/system-prompt.ts | 191 +- ui/src/ui/tool-display.ts | 1 + ui/src/ui/tool-display.zh-CN.json | 408 + 125 files changed, 40169 insertions(+), 96 deletions(-) create mode 100644 .agent/skills/antigravity-kit/api-patterns/SKILL.md create mode 100644 .agent/skills/antigravity-kit/api-patterns/api-style.md create mode 100644 .agent/skills/antigravity-kit/api-patterns/auth.md create mode 100644 .agent/skills/antigravity-kit/api-patterns/documentation.md create mode 100644 .agent/skills/antigravity-kit/api-patterns/graphql.md create mode 100644 .agent/skills/antigravity-kit/api-patterns/rate-limiting.md create mode 100644 .agent/skills/antigravity-kit/api-patterns/response.md create mode 100644 .agent/skills/antigravity-kit/api-patterns/rest.md create mode 100644 .agent/skills/antigravity-kit/api-patterns/security-testing.md create mode 100644 .agent/skills/antigravity-kit/api-patterns/trpc.md create mode 100644 .agent/skills/antigravity-kit/api-patterns/versioning.md create mode 100644 .agent/skills/antigravity-kit/app-builder/SKILL.md create mode 100644 .agent/skills/antigravity-kit/app-builder/agent-coordination.md create mode 100644 .agent/skills/antigravity-kit/app-builder/feature-building.md create mode 100644 .agent/skills/antigravity-kit/app-builder/project-detection.md create mode 100644 .agent/skills/antigravity-kit/app-builder/scaffolding.md create mode 100644 .agent/skills/antigravity-kit/app-builder/tech-stack.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/SKILL.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/astro-static/TEMPLATE.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/chrome-extension/TEMPLATE.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/cli-tool/TEMPLATE.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/electron-desktop/TEMPLATE.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/express-api/TEMPLATE.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/flutter-app/TEMPLATE.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/monorepo-turborepo/TEMPLATE.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/nextjs-fullstack/TEMPLATE.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/nextjs-saas/TEMPLATE.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/nextjs-static/TEMPLATE.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/nuxt-app/TEMPLATE.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/python-fastapi/TEMPLATE.md create mode 100644 .agent/skills/antigravity-kit/app-builder/templates/react-native-app/TEMPLATE.md create mode 100644 .agent/skills/antigravity-kit/architecture/SKILL.md create mode 100644 .agent/skills/antigravity-kit/architecture/context-discovery.md create mode 100644 .agent/skills/antigravity-kit/architecture/examples.md create mode 100644 .agent/skills/antigravity-kit/architecture/pattern-selection.md create mode 100644 .agent/skills/antigravity-kit/architecture/patterns-reference.md create mode 100644 .agent/skills/antigravity-kit/architecture/trade-off-analysis.md create mode 100644 .agent/skills/antigravity-kit/bash-linux/SKILL.md create mode 100644 .agent/skills/antigravity-kit/behavioral-modes/SKILL.md create mode 100644 .agent/skills/antigravity-kit/brainstorming/SKILL.md create mode 100644 .agent/skills/antigravity-kit/brainstorming/dynamic-questioning.md create mode 100644 .agent/skills/antigravity-kit/clean-code/SKILL.md create mode 100644 .agent/skills/antigravity-kit/code-review-checklist/SKILL.md create mode 100644 .agent/skills/antigravity-kit/database-design/SKILL.md create mode 100644 .agent/skills/antigravity-kit/database-design/database-selection.md create mode 100644 .agent/skills/antigravity-kit/database-design/indexing.md create mode 100644 .agent/skills/antigravity-kit/database-design/migrations.md create mode 100644 .agent/skills/antigravity-kit/database-design/optimization.md create mode 100644 .agent/skills/antigravity-kit/database-design/orm-selection.md create mode 100644 .agent/skills/antigravity-kit/database-design/schema-design.md create mode 100644 .agent/skills/antigravity-kit/deployment-procedures/SKILL.md create mode 100644 .agent/skills/antigravity-kit/doc.md create mode 100644 .agent/skills/antigravity-kit/docker-expert/SKILL.md create mode 100644 .agent/skills/antigravity-kit/documentation-templates/SKILL.md create mode 100644 .agent/skills/antigravity-kit/frontend-design/SKILL.md create mode 100644 .agent/skills/antigravity-kit/frontend-design/animation-guide.md create mode 100644 .agent/skills/antigravity-kit/frontend-design/color-system.md create mode 100644 .agent/skills/antigravity-kit/frontend-design/decision-trees.md create mode 100644 .agent/skills/antigravity-kit/frontend-design/motion-graphics.md create mode 100644 .agent/skills/antigravity-kit/frontend-design/typography-system.md create mode 100644 .agent/skills/antigravity-kit/frontend-design/ux-psychology.md create mode 100644 .agent/skills/antigravity-kit/frontend-design/visual-effects.md create mode 100644 .agent/skills/antigravity-kit/game-development/2d-games/SKILL.md create mode 100644 .agent/skills/antigravity-kit/game-development/3d-games/SKILL.md create mode 100644 .agent/skills/antigravity-kit/game-development/SKILL.md create mode 100644 .agent/skills/antigravity-kit/game-development/game-art/SKILL.md create mode 100644 .agent/skills/antigravity-kit/game-development/game-audio/SKILL.md create mode 100644 .agent/skills/antigravity-kit/game-development/game-design/SKILL.md create mode 100644 .agent/skills/antigravity-kit/game-development/mobile-games/SKILL.md create mode 100644 .agent/skills/antigravity-kit/game-development/multiplayer/SKILL.md create mode 100644 .agent/skills/antigravity-kit/game-development/pc-games/SKILL.md create mode 100644 .agent/skills/antigravity-kit/game-development/vr-ar/SKILL.md create mode 100644 .agent/skills/antigravity-kit/game-development/web-games/SKILL.md create mode 100644 .agent/skills/antigravity-kit/geo-fundamentals/SKILL.md create mode 100644 .agent/skills/antigravity-kit/i18n-localization/SKILL.md create mode 100644 .agent/skills/antigravity-kit/lint-and-validate/SKILL.md create mode 100644 .agent/skills/antigravity-kit/mcp-builder/SKILL.md create mode 100644 .agent/skills/antigravity-kit/mobile-design/SKILL.md create mode 100644 .agent/skills/antigravity-kit/mobile-design/decision-trees.md create mode 100644 .agent/skills/antigravity-kit/mobile-design/mobile-backend.md create mode 100644 .agent/skills/antigravity-kit/mobile-design/mobile-color-system.md create mode 100644 .agent/skills/antigravity-kit/mobile-design/mobile-debugging.md create mode 100644 .agent/skills/antigravity-kit/mobile-design/mobile-design-thinking.md create mode 100644 .agent/skills/antigravity-kit/mobile-design/mobile-navigation.md create mode 100644 .agent/skills/antigravity-kit/mobile-design/mobile-performance.md create mode 100644 .agent/skills/antigravity-kit/mobile-design/mobile-testing.md create mode 100644 .agent/skills/antigravity-kit/mobile-design/mobile-typography.md create mode 100644 .agent/skills/antigravity-kit/mobile-design/platform-android.md create mode 100644 .agent/skills/antigravity-kit/mobile-design/platform-ios.md create mode 100644 .agent/skills/antigravity-kit/mobile-design/touch-psychology.md create mode 100644 .agent/skills/antigravity-kit/nestjs-expert/SKILL.md create mode 100644 .agent/skills/antigravity-kit/nextjs-best-practices/SKILL.md create mode 100644 .agent/skills/antigravity-kit/nodejs-best-practices/SKILL.md create mode 100644 .agent/skills/antigravity-kit/parallel-agents/SKILL.md create mode 100644 .agent/skills/antigravity-kit/performance-profiling/SKILL.md create mode 100644 .agent/skills/antigravity-kit/plan-writing/SKILL.md create mode 100644 .agent/skills/antigravity-kit/powershell-windows/SKILL.md create mode 100644 .agent/skills/heygen/SKILL.md create mode 100644 .agent/skills/heygen/rules/assets.md create mode 100644 .agent/skills/heygen/rules/authentication.md create mode 100644 .agent/skills/heygen/rules/avatars.md create mode 100644 .agent/skills/heygen/rules/backgrounds.md create mode 100644 .agent/skills/heygen/rules/captions.md create mode 100644 .agent/skills/heygen/rules/dimensions.md create mode 100644 .agent/skills/heygen/rules/photo-avatars.md create mode 100644 .agent/skills/heygen/rules/quota.md create mode 100644 .agent/skills/heygen/rules/remotion-integration.md create mode 100644 .agent/skills/heygen/rules/scripts.md create mode 100644 .agent/skills/heygen/rules/streaming-avatars.md create mode 100644 .agent/skills/heygen/rules/templates.md create mode 100644 .agent/skills/heygen/rules/text-overlays.md create mode 100644 .agent/skills/heygen/rules/video-agent.md create mode 100644 .agent/skills/heygen/rules/video-generation.md create mode 100644 .agent/skills/heygen/rules/video-status.md create mode 100644 .agent/skills/heygen/rules/video-translation.md create mode 100644 .agent/skills/heygen/rules/voices.md create mode 100644 .agent/skills/heygen/rules/webhooks.md create mode 100644 .agent/skills/karpathy-guidelines/SKILL.md create mode 100644 heyclaw/contrubuting-openclaw.md create mode 100644 package-lock.json create mode 100644 ui/src/ui/tool-display.zh-CN.json diff --git a/.agent/skills/antigravity-kit/api-patterns/SKILL.md b/.agent/skills/antigravity-kit/api-patterns/SKILL.md new file mode 100644 index 000000000..fbd4bef4b --- /dev/null +++ b/.agent/skills/antigravity-kit/api-patterns/SKILL.md @@ -0,0 +1,81 @@ +--- +name: api-patterns +description: API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination. +allowed-tools: Read, Write, Edit, Glob, Grep +--- + +# API Patterns + +> API design principles and decision-making for 2025. +> **Learn to THINK, not copy fixed patterns.** + +## ๐ŸŽฏ Selective Reading Rule + +**Read ONLY files relevant to the request!** Check the content map, find what you need. + +--- + +## ๐Ÿ“‘ Content Map + +| File | Description | When to Read | +|------|-------------|--------------| +| `api-style.md` | REST vs GraphQL vs tRPC decision tree | Choosing API type | +| `rest.md` | Resource naming, HTTP methods, status codes | Designing REST API | +| `response.md` | Envelope pattern, error format, pagination | Response structure | +| `graphql.md` | Schema design, when to use, security | Considering GraphQL | +| `trpc.md` | TypeScript monorepo, type safety | TS fullstack projects | +| `versioning.md` | URI/Header/Query versioning | API evolution planning | +| `auth.md` | JWT, OAuth, Passkey, API Keys | Auth pattern selection | +| `rate-limiting.md` | Token bucket, sliding window | API protection | +| `documentation.md` | OpenAPI/Swagger best practices | Documentation | +| `security-testing.md` | OWASP API Top 10, auth/authz testing | Security audits | + +--- + +## ๐Ÿ”— Related Skills + +| Need | Skill | +|------|-------| +| API implementation | `@[skills/backend-development]` | +| Data structure | `@[skills/database-design]` | +| Security details | `@[skills/security-hardening]` | + +--- + +## โœ… Decision Checklist + +Before designing an API: + +- [ ] **Asked user about API consumers?** +- [ ] **Chosen API style for THIS context?** (REST/GraphQL/tRPC) +- [ ] **Defined consistent response format?** +- [ ] **Planned versioning strategy?** +- [ ] **Considered authentication needs?** +- [ ] **Planned rate limiting?** +- [ ] **Documentation approach defined?** + +--- + +## โŒ Anti-Patterns + +**DON'T:** +- Default to REST for everything +- Use verbs in REST endpoints (/getUsers) +- Return inconsistent response formats +- Expose internal errors to clients +- Skip rate limiting + +**DO:** +- Choose API style based on context +- Ask about client requirements +- Document thoroughly +- Use appropriate status codes + +--- + +## Script + +| Script | Purpose | Command | +|--------|---------|---------| +| `scripts/api_validator.py` | API endpoint validation | `python scripts/api_validator.py ` | + diff --git a/.agent/skills/antigravity-kit/api-patterns/api-style.md b/.agent/skills/antigravity-kit/api-patterns/api-style.md new file mode 100644 index 000000000..c94cb8a49 --- /dev/null +++ b/.agent/skills/antigravity-kit/api-patterns/api-style.md @@ -0,0 +1,42 @@ +# API Style Selection (2025) + +> REST vs GraphQL vs tRPC - Hangi durumda hangisi? + +## Decision Tree + +``` +Who are the API consumers? +โ”‚ +โ”œโ”€โ”€ Public API / Multiple platforms +โ”‚ โ””โ”€โ”€ REST + OpenAPI (widest compatibility) +โ”‚ +โ”œโ”€โ”€ Complex data needs / Multiple frontends +โ”‚ โ””โ”€โ”€ GraphQL (flexible queries) +โ”‚ +โ”œโ”€โ”€ TypeScript frontend + backend (monorepo) +โ”‚ โ””โ”€โ”€ tRPC (end-to-end type safety) +โ”‚ +โ”œโ”€โ”€ Real-time / Event-driven +โ”‚ โ””โ”€โ”€ WebSocket + AsyncAPI +โ”‚ +โ””โ”€โ”€ Internal microservices + โ””โ”€โ”€ gRPC (performance) or REST (simplicity) +``` + +## Comparison + +| Factor | REST | GraphQL | tRPC | +|--------|------|---------|------| +| **Best for** | Public APIs | Complex apps | TS monorepos | +| **Learning curve** | Low | Medium | Low (if TS) | +| **Over/under fetching** | Common | Solved | Solved | +| **Type safety** | Manual (OpenAPI) | Schema-based | Automatic | +| **Caching** | HTTP native | Complex | Client-based | + +## Selection Questions + +1. Who are the API consumers? +2. Is the frontend TypeScript? +3. How complex are the data relationships? +4. Is caching critical? +5. Public or internal API? diff --git a/.agent/skills/antigravity-kit/api-patterns/auth.md b/.agent/skills/antigravity-kit/api-patterns/auth.md new file mode 100644 index 000000000..c04030d34 --- /dev/null +++ b/.agent/skills/antigravity-kit/api-patterns/auth.md @@ -0,0 +1,24 @@ +# Authentication Patterns + +> Choose auth pattern based on use case. + +## Selection Guide + +| Pattern | Best For | +|---------|----------| +| **JWT** | Stateless, microservices | +| **Session** | Traditional web, simple | +| **OAuth 2.0** | Third-party integration | +| **API Keys** | Server-to-server, public APIs | +| **Passkey** | Modern passwordless (2025+) | + +## JWT Principles + +``` +Important: +โ”œโ”€โ”€ Always verify signature +โ”œโ”€โ”€ Check expiration +โ”œโ”€โ”€ Include minimal claims +โ”œโ”€โ”€ Use short expiry + refresh tokens +โ””โ”€โ”€ Never store sensitive data in JWT +``` diff --git a/.agent/skills/antigravity-kit/api-patterns/documentation.md b/.agent/skills/antigravity-kit/api-patterns/documentation.md new file mode 100644 index 000000000..5e199da0a --- /dev/null +++ b/.agent/skills/antigravity-kit/api-patterns/documentation.md @@ -0,0 +1,26 @@ +# API Documentation Principles + +> Good docs = happy developers = API adoption. + +## OpenAPI/Swagger Essentials + +``` +Include: +โ”œโ”€โ”€ All endpoints with examples +โ”œโ”€โ”€ Request/response schemas +โ”œโ”€โ”€ Authentication requirements +โ”œโ”€โ”€ Error response formats +โ””โ”€โ”€ Rate limiting info +``` + +## Good Documentation Has + +``` +Essentials: +โ”œโ”€โ”€ Quick start / Getting started +โ”œโ”€โ”€ Authentication guide +โ”œโ”€โ”€ Complete API reference +โ”œโ”€โ”€ Error handling guide +โ”œโ”€โ”€ Code examples (multiple languages) +โ””โ”€โ”€ Changelog +``` diff --git a/.agent/skills/antigravity-kit/api-patterns/graphql.md b/.agent/skills/antigravity-kit/api-patterns/graphql.md new file mode 100644 index 000000000..1e5632ce7 --- /dev/null +++ b/.agent/skills/antigravity-kit/api-patterns/graphql.md @@ -0,0 +1,41 @@ +# GraphQL Principles + +> Flexible queries for complex, interconnected data. + +## When to Use + +``` +โœ… Good fit: +โ”œโ”€โ”€ Complex, interconnected data +โ”œโ”€โ”€ Multiple frontend platforms +โ”œโ”€โ”€ Clients need flexible queries +โ”œโ”€โ”€ Evolving data requirements +โ””โ”€โ”€ Reducing over-fetching matters + +โŒ Poor fit: +โ”œโ”€โ”€ Simple CRUD operations +โ”œโ”€โ”€ File upload heavy +โ”œโ”€โ”€ HTTP caching important +โ””โ”€โ”€ Team unfamiliar with GraphQL +``` + +## Schema Design Principles + +``` +Principles: +โ”œโ”€โ”€ Think in graphs, not endpoints +โ”œโ”€โ”€ Design for evolvability (no versions) +โ”œโ”€โ”€ Use connections for pagination +โ”œโ”€โ”€ Be specific with types (not generic "data") +โ””โ”€โ”€ Handle nullability thoughtfully +``` + +## Security Considerations + +``` +Protect against: +โ”œโ”€โ”€ Query depth attacks โ†’ Set max depth +โ”œโ”€โ”€ Query complexity โ†’ Calculate cost +โ”œโ”€โ”€ Batching abuse โ†’ Limit batch size +โ”œโ”€โ”€ Introspection โ†’ Disable in production +``` diff --git a/.agent/skills/antigravity-kit/api-patterns/rate-limiting.md b/.agent/skills/antigravity-kit/api-patterns/rate-limiting.md new file mode 100644 index 000000000..cffaa2903 --- /dev/null +++ b/.agent/skills/antigravity-kit/api-patterns/rate-limiting.md @@ -0,0 +1,31 @@ +# Rate Limiting Principles + +> Protect your API from abuse and overload. + +## Why Rate Limit + +``` +Protect against: +โ”œโ”€โ”€ Brute force attacks +โ”œโ”€โ”€ Resource exhaustion +โ”œโ”€โ”€ Cost overruns (if pay-per-use) +โ””โ”€โ”€ Unfair usage +``` + +## Strategy Selection + +| Type | How | When | +|------|-----|------| +| **Token bucket** | Burst allowed, refills over time | Most APIs | +| **Sliding window** | Smooth distribution | Strict limits | +| **Fixed window** | Simple counters per window | Basic needs | + +## Response Headers + +``` +Include in headers: +โ”œโ”€โ”€ X-RateLimit-Limit (max requests) +โ”œโ”€โ”€ X-RateLimit-Remaining (requests left) +โ”œโ”€โ”€ X-RateLimit-Reset (when limit resets) +โ””โ”€โ”€ Return 429 when exceeded +``` diff --git a/.agent/skills/antigravity-kit/api-patterns/response.md b/.agent/skills/antigravity-kit/api-patterns/response.md new file mode 100644 index 000000000..3c6ab1412 --- /dev/null +++ b/.agent/skills/antigravity-kit/api-patterns/response.md @@ -0,0 +1,37 @@ +# Response Format Principles + +> Consistency is key - choose a format and stick to it. + +## Common Patterns + +``` +Choose one: +โ”œโ”€โ”€ Envelope pattern ({ success, data, error }) +โ”œโ”€โ”€ Direct data (just return the resource) +โ””โ”€โ”€ HAL/JSON:API (hypermedia) +``` + +## Error Response + +``` +Include: +โ”œโ”€โ”€ Error code (for programmatic handling) +โ”œโ”€โ”€ User message (for display) +โ”œโ”€โ”€ Details (for debugging, field-level errors) +โ”œโ”€โ”€ Request ID (for support) +โ””โ”€โ”€ NOT internal details (security!) +``` + +## Pagination Types + +| Type | Best For | Trade-offs | +|------|----------|------------| +| **Offset** | Simple, jumpable | Performance on large datasets | +| **Cursor** | Large datasets | Can't jump to page | +| **Keyset** | Performance critical | Requires sortable key | + +### Selection Questions + +1. How large is the dataset? +2. Do users need to jump to specific pages? +3. Is data frequently changing? diff --git a/.agent/skills/antigravity-kit/api-patterns/rest.md b/.agent/skills/antigravity-kit/api-patterns/rest.md new file mode 100644 index 000000000..c04aa7ca7 --- /dev/null +++ b/.agent/skills/antigravity-kit/api-patterns/rest.md @@ -0,0 +1,40 @@ +# REST Principles + +> Resource-based API design - nouns not verbs. + +## Resource Naming Rules + +``` +Principles: +โ”œโ”€โ”€ Use NOUNS, not verbs (resources, not actions) +โ”œโ”€โ”€ Use PLURAL forms (/users not /user) +โ”œโ”€โ”€ Use lowercase with hyphens (/user-profiles) +โ”œโ”€โ”€ Nest for relationships (/users/123/posts) +โ””โ”€โ”€ Keep shallow (max 3 levels deep) +``` + +## HTTP Method Selection + +| Method | Purpose | Idempotent? | Body? | +|--------|---------|-------------|-------| +| **GET** | Read resource(s) | Yes | No | +| **POST** | Create new resource | No | Yes | +| **PUT** | Replace entire resource | Yes | Yes | +| **PATCH** | Partial update | No | Yes | +| **DELETE** | Remove resource | Yes | No | + +## Status Code Selection + +| Situation | Code | Why | +|-----------|------|-----| +| Success (read) | 200 | Standard success | +| Created | 201 | New resource created | +| No content | 204 | Success, nothing to return | +| Bad request | 400 | Malformed request | +| Unauthorized | 401 | Missing/invalid auth | +| Forbidden | 403 | Valid auth, no permission | +| Not found | 404 | Resource doesn't exist | +| Conflict | 409 | State conflict (duplicate) | +| Validation error | 422 | Valid syntax, invalid data | +| Rate limited | 429 | Too many requests | +| Server error | 500 | Our fault | diff --git a/.agent/skills/antigravity-kit/api-patterns/security-testing.md b/.agent/skills/antigravity-kit/api-patterns/security-testing.md new file mode 100644 index 000000000..265023fa8 --- /dev/null +++ b/.agent/skills/antigravity-kit/api-patterns/security-testing.md @@ -0,0 +1,122 @@ +# API Security Testing + +> Principles for testing API security. OWASP API Top 10, authentication, authorization testing. + +--- + +## OWASP API Security Top 10 + +| Vulnerability | Test Focus | +|---------------|------------| +| **API1: BOLA** | Access other users' resources | +| **API2: Broken Auth** | JWT, session, credentials | +| **API3: Property Auth** | Mass assignment, data exposure | +| **API4: Resource Consumption** | Rate limiting, DoS | +| **API5: Function Auth** | Admin endpoints, role bypass | +| **API6: Business Flow** | Logic abuse, automation | +| **API7: SSRF** | Internal network access | +| **API8: Misconfiguration** | Debug endpoints, CORS | +| **API9: Inventory** | Shadow APIs, old versions | +| **API10: Unsafe Consumption** | Third-party API trust | + +--- + +## Authentication Testing + +### JWT Testing + +| Check | What to Test | +|-------|--------------| +| Algorithm | None, algorithm confusion | +| Secret | Weak secrets, brute force | +| Claims | Expiration, issuer, audience | +| Signature | Manipulation, key injection | + +### Session Testing + +| Check | What to Test | +|-------|--------------| +| Generation | Predictability | +| Storage | Client-side security | +| Expiration | Timeout enforcement | +| Invalidation | Logout effectiveness | + +--- + +## Authorization Testing + +| Test Type | Approach | +|-----------|----------| +| **Horizontal** | Access peer users' data | +| **Vertical** | Access higher privilege functions | +| **Context** | Access outside allowed scope | + +### BOLA/IDOR Testing + +1. Identify resource IDs in requests +2. Capture request with user A's session +3. Replay with user B's session +4. Check for unauthorized access + +--- + +## Input Validation Testing + +| Injection Type | Test Focus | +|----------------|------------| +| SQL | Query manipulation | +| NoSQL | Document queries | +| Command | System commands | +| LDAP | Directory queries | + +**Approach:** Test all parameters, try type coercion, test boundaries, check error messages. + +--- + +## Rate Limiting Testing + +| Aspect | Check | +|--------|-------| +| Existence | Is there any limit? | +| Bypass | Headers, IP rotation | +| Scope | Per-user, per-IP, global | + +**Bypass techniques:** X-Forwarded-For, different HTTP methods, case variations, API versioning. + +--- + +## GraphQL Security + +| Test | Focus | +|------|-------| +| Introspection | Schema disclosure | +| Batching | Query DoS | +| Nesting | Depth-based DoS | +| Authorization | Field-level access | + +--- + +## Security Testing Checklist + +**Authentication:** +- [ ] Test for bypass +- [ ] Check credential strength +- [ ] Verify token security + +**Authorization:** +- [ ] Test BOLA/IDOR +- [ ] Check privilege escalation +- [ ] Verify function access + +**Input:** +- [ ] Test all parameters +- [ ] Check for injection + +**Config:** +- [ ] Check CORS +- [ ] Verify headers +- [ ] Test error handling + +--- + +> **Remember:** APIs are the backbone of modern apps. Test them like attackers will. diff --git a/.agent/skills/antigravity-kit/api-patterns/trpc.md b/.agent/skills/antigravity-kit/api-patterns/trpc.md new file mode 100644 index 000000000..109768660 --- /dev/null +++ b/.agent/skills/antigravity-kit/api-patterns/trpc.md @@ -0,0 +1,41 @@ +# tRPC Principles + +> End-to-end type safety for TypeScript monorepos. + +## When to Use + +``` +โœ… Perfect fit: +โ”œโ”€โ”€ TypeScript on both ends +โ”œโ”€โ”€ Monorepo structure +โ”œโ”€โ”€ Internal tools +โ”œโ”€โ”€ Rapid development +โ””โ”€โ”€ Type safety critical + +โŒ Poor fit: +โ”œโ”€โ”€ Non-TypeScript clients +โ”œโ”€โ”€ Public API +โ”œโ”€โ”€ Need REST conventions +โ””โ”€โ”€ Multiple language backends +``` + +## Key Benefits + +``` +Why tRPC: +โ”œโ”€โ”€ Zero schema maintenance +โ”œโ”€โ”€ End-to-end type inference +โ”œโ”€โ”€ IDE autocomplete across stack +โ”œโ”€โ”€ Instant API changes reflected +โ””โ”€โ”€ No code generation step +``` + +## Integration Patterns + +``` +Common setups: +โ”œโ”€โ”€ Next.js + tRPC (most common) +โ”œโ”€โ”€ Monorepo with shared types +โ”œโ”€โ”€ Remix + tRPC +โ””โ”€โ”€ Any TS frontend + backend +``` diff --git a/.agent/skills/antigravity-kit/api-patterns/versioning.md b/.agent/skills/antigravity-kit/api-patterns/versioning.md new file mode 100644 index 000000000..5ead01b24 --- /dev/null +++ b/.agent/skills/antigravity-kit/api-patterns/versioning.md @@ -0,0 +1,22 @@ +# Versioning Strategies + +> Plan for API evolution from day one. + +## Decision Factors + +| Strategy | Implementation | Trade-offs | +|----------|---------------|------------| +| **URI** | /v1/users | Clear, easy caching | +| **Header** | Accept-Version: 1 | Cleaner URLs, harder discovery | +| **Query** | ?version=1 | Easy to add, messy | +| **None** | Evolve carefully | Best for internal, risky for public | + +## Versioning Philosophy + +``` +Consider: +โ”œโ”€โ”€ Public API? โ†’ Version in URI +โ”œโ”€โ”€ Internal only? โ†’ May not need versioning +โ”œโ”€โ”€ GraphQL? โ†’ Typically no versions (evolve schema) +โ”œโ”€โ”€ tRPC? โ†’ Types enforce compatibility +``` diff --git a/.agent/skills/antigravity-kit/app-builder/SKILL.md b/.agent/skills/antigravity-kit/app-builder/SKILL.md new file mode 100644 index 000000000..2850e08ef --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/SKILL.md @@ -0,0 +1,75 @@ +--- +name: app-builder +description: Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents. +allowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent +--- + +# App Builder - Application Building Orchestrator + +> Analyzes user's requests, determines tech stack, plans structure, and coordinates agents. + +## ๐ŸŽฏ Selective Reading Rule + +**Read ONLY files relevant to the request!** Check the content map, find what you need. + +| File | Description | When to Read | +|------|-------------|--------------| +| `project-detection.md` | Keyword matrix, project type detection | Starting new project | +| `tech-stack.md` | 2025 default stack, alternatives | Choosing technologies | +| `agent-coordination.md` | Agent pipeline, execution order | Coordinating multi-agent work | +| `scaffolding.md` | Directory structure, core files | Creating project structure | +| `feature-building.md` | Feature analysis, error handling | Adding features to existing project | +| `templates/SKILL.md` | **Project templates** | Scaffolding new project | + +--- + +## ๐Ÿ“ฆ Templates (13) + +Quick-start scaffolding for new projects. **Read the matching template only!** + +| Template | Tech Stack | When to Use | +|----------|------------|-------------| +| [nextjs-fullstack](templates/nextjs-fullstack/TEMPLATE.md) | Next.js + Prisma | Full-stack web app | +| [nextjs-saas](templates/nextjs-saas/TEMPLATE.md) | Next.js + Stripe | SaaS product | +| [nextjs-static](templates/nextjs-static/TEMPLATE.md) | Next.js + Framer | Landing page | +| [nuxt-app](templates/nuxt-app/TEMPLATE.md) | Nuxt 3 + Pinia | Vue full-stack app | +| [express-api](templates/express-api/TEMPLATE.md) | Express + JWT | REST API | +| [python-fastapi](templates/python-fastapi/TEMPLATE.md) | FastAPI | Python API | +| [react-native-app](templates/react-native-app/TEMPLATE.md) | Expo + Zustand | Mobile app | +| [flutter-app](templates/flutter-app/TEMPLATE.md) | Flutter + Riverpod | Cross-platform mobile | +| [electron-desktop](templates/electron-desktop/TEMPLATE.md) | Electron + React | Desktop app | +| [chrome-extension](templates/chrome-extension/TEMPLATE.md) | Chrome MV3 | Browser extension | +| [cli-tool](templates/cli-tool/TEMPLATE.md) | Node.js + Commander | CLI app | +| [monorepo-turborepo](templates/monorepo-turborepo/TEMPLATE.md) | Turborepo + pnpm | Monorepo | + +--- + +## ๐Ÿ”— Related Agents + +| Agent | Role | +|-------|------| +| `project-planner` | Task breakdown, dependency graph | +| `frontend-specialist` | UI components, pages | +| `backend-specialist` | API, business logic | +| `database-architect` | Schema, migrations | +| `devops-engineer` | Deployment, preview | + +--- + +## Usage Example + +``` +User: "Make an Instagram clone with photo sharing and likes" + +App Builder Process: +1. Project type: Social Media App +2. Tech stack: Next.js + Prisma + Cloudinary + Clerk +3. Create plan: + โ”œโ”€ Database schema (users, posts, likes, follows) + โ”œโ”€ API routes (12 endpoints) + โ”œโ”€ Pages (feed, profile, upload) + โ””โ”€ Components (PostCard, Feed, LikeButton) +4. Coordinate agents +5. Report progress +6. Start preview +``` diff --git a/.agent/skills/antigravity-kit/app-builder/agent-coordination.md b/.agent/skills/antigravity-kit/app-builder/agent-coordination.md new file mode 100644 index 000000000..eac062f33 --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/agent-coordination.md @@ -0,0 +1,71 @@ +# Agent Coordination + +> How App Builder orchestrates specialist agents. + +## Agent Pipeline + +``` +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ APP BUILDER (Orchestrator) โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + โ”‚ + โ–ผ +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ PROJECT PLANNER โ”‚ +โ”‚ โ€ข Task breakdown โ”‚ +โ”‚ โ€ข Dependency graph โ”‚ +โ”‚ โ€ข File structure planning โ”‚ +โ”‚ โ€ข Create {task-slug}.md in project root (MANDATORY) โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + โ”‚ + โ–ผ +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ CHECKPOINT: PLAN VERIFICATION โ”‚ +โ”‚ ๐Ÿ”ด VERIFY: Does {task-slug}.md exist in project root? โ”‚ +โ”‚ ๐Ÿ”ด If NO โ†’ STOP โ†’ Create plan file first โ”‚ +โ”‚ ๐Ÿ”ด If YES โ†’ Proceed to specialist agents โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + โ”‚ + โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” + โ–ผ โ–ผ โ–ผ +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ DATABASE โ”‚ โ”‚ BACKEND โ”‚ โ”‚ FRONTEND โ”‚ +โ”‚ ARCHITECT โ”‚ โ”‚ SPECIALIST โ”‚ โ”‚ SPECIALIST โ”‚ +โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ +โ”‚ โ€ข Schema design โ”‚ โ”‚ โ€ข API routes โ”‚ ๏ฟฝ๏ฟฝ โ€ข Components โ”‚ +โ”‚ โ€ข Migrations โ”‚ โ”‚ โ€ข Controllers โ”‚ โ”‚ โ€ข Pages โ”‚ +โ”‚ โ€ข Seed data โ”‚ โ”‚ โ€ข Middleware โ”‚ โ”‚ โ€ข Styling โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + โ”‚ โ”‚ โ”‚ + โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + โ–ผ +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ PARALLEL PHASE (Optional) โ”‚ +โ”‚ โ€ข Security Auditor โ†’ Vulnerability check โ”‚ +โ”‚ โ€ข Test Engineer โ†’ Unit tests โ”‚ +โ”‚ โ€ข Performance Optimizer โ†’ Bundle analysis โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ + โ”‚ + โ–ผ +โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€๏ฟฝ๏ฟฝโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” +โ”‚ DEVOPS ENGINEER โ”‚ +โ”‚ โ€ข Environment setup โ”‚ +โ”‚ โ€ข Preview deployment โ”‚ +โ”‚ โ€ข Health check โ”‚ +โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ +``` + +## Execution Order + +| Phase | Agent(s) | Parallel? | Prerequisite | CHECKPOINT | +|-------|----------|-----------|--------------|------------| +| 0 | Socratic Gate | โŒ | - | โœ… Ask 3 questions | +| 1 | Project Planner | โŒ | Questions answered | โœ… **PLAN.md created** | +| 1.5 | **PLAN VERIFICATION** | โŒ | PLAN.md exists | โœ… **File exists in root** | +| 2 | Database Architect | โŒ | Plan ready | Schema defined | +| 3 | Backend Specialist | โŒ | Schema ready | API routes created | +| 4 | Frontend Specialist | โœ… | API ready (partial) | UI components ready | +| 5 | Security Auditor, Test Engineer | โœ… | Code ready | Tests & audit pass | +| 6 | DevOps Engineer | โŒ | All code ready | Deployment ready | + +> ๐Ÿ”ด **CRITICAL:** Phase 1.5 is MANDATORY. No specialist agents proceed without PLAN.md verification. diff --git a/.agent/skills/antigravity-kit/app-builder/feature-building.md b/.agent/skills/antigravity-kit/app-builder/feature-building.md new file mode 100644 index 000000000..7bacb0b8e --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/feature-building.md @@ -0,0 +1,53 @@ +# Feature Building + +> How to analyze and implement new features. + +## Feature Analysis + +``` +Request: "add payment system" + +Analysis: +โ”œโ”€โ”€ Required Changes: +โ”‚ โ”œโ”€โ”€ Database: orders, payments tables +โ”‚ โ”œโ”€โ”€ Backend: /api/checkout, /api/webhooks/stripe +โ”‚ โ”œโ”€โ”€ Frontend: CheckoutForm, PaymentSuccess +โ”‚ โ””โ”€โ”€ Config: Stripe API keys +โ”‚ +โ”œโ”€โ”€ Dependencies: +โ”‚ โ”œโ”€โ”€ stripe package +โ”‚ โ””โ”€โ”€ Existing user authentication +โ”‚ +โ””โ”€โ”€ Estimated Time: 15-20 minutes +``` + +## Iterative Enhancement Process + +``` +1. Analyze existing project +2. Create change plan +3. Present plan to user +4. Get approval +5. Apply changes +6. Test +7. Show preview +``` + +## Error Handling + +| Error Type | Solution Strategy | +|------------|-------------------| +| TypeScript Error | Fix type, add missing import | +| Missing Dependency | Run npm install | +| Port Conflict | Suggest alternative port | +| Database Error | Check migration, validate connection | + +## Recovery Strategy + +``` +1. Detect error +2. Try automatic fix +3. If failed, report to user +4. Suggest alternative +5. Rollback if necessary +``` diff --git a/.agent/skills/antigravity-kit/app-builder/project-detection.md b/.agent/skills/antigravity-kit/app-builder/project-detection.md new file mode 100644 index 000000000..ea06187ab --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/project-detection.md @@ -0,0 +1,34 @@ +# Project Type Detection + +> Analyze user requests to determine project type and template. + +## Keyword Matrix + +| Keywords | Project Type | Template | +|----------|--------------|----------| +| blog, post, article | Blog | astro-static | +| e-commerce, product, cart, payment | E-commerce | nextjs-saas | +| dashboard, panel, management | Admin Dashboard | nextjs-fullstack | +| api, backend, service, rest | API Service | express-api | +| python, fastapi, django | Python API | python-fastapi | +| mobile, android, ios, react native | Mobile App (RN) | react-native-app | +| flutter, dart | Mobile App (Flutter) | flutter-app | +| portfolio, personal, cv | Portfolio | nextjs-static | +| crm, customer, sales | CRM | nextjs-fullstack | +| saas, subscription, stripe | SaaS | nextjs-saas | +| landing, promotional, marketing | Landing Page | nextjs-static | +| docs, documentation | Documentation | astro-static | +| extension, plugin, chrome | Browser Extension | chrome-extension | +| desktop, electron | Desktop App | electron-desktop | +| cli, command line, terminal | CLI Tool | cli-tool | +| monorepo, workspace | Monorepo | monorepo-turborepo | + +## Detection Process + +``` +1. Tokenize user request +2. Extract keywords +3. Determine project type +4. Detect missing information โ†’ forward to conversation-manager +5. Suggest tech stack +``` diff --git a/.agent/skills/antigravity-kit/app-builder/scaffolding.md b/.agent/skills/antigravity-kit/app-builder/scaffolding.md new file mode 100644 index 000000000..35bba8a17 --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/scaffolding.md @@ -0,0 +1,118 @@ +# Project Scaffolding + +> Directory structure and core files for new projects. + +--- + +## Next.js Full-Stack Structure (2025 Optimized) + +``` +project-name/ +โ”œโ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ app/ # Routes only (thin layer) +โ”‚ โ”‚ โ”œโ”€โ”€ layout.tsx +โ”‚ โ”‚ โ”œโ”€โ”€ page.tsx +โ”‚ โ”‚ โ”œโ”€โ”€ globals.css +โ”‚ โ”‚ โ”œโ”€โ”€ (auth)/ # Route group - auth pages +โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ login/page.tsx +โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ register/page.tsx +โ”‚ โ”‚ โ”œโ”€โ”€ (dashboard)/ # Route group - dashboard layout +โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ layout.tsx +โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ page.tsx +โ”‚ โ”‚ โ””โ”€โ”€ api/ +โ”‚ โ”‚ โ””โ”€โ”€ [resource]/route.ts +โ”‚ โ”‚ +โ”‚ โ”œโ”€โ”€ features/ # Feature-based modules +โ”‚ โ”‚ โ”œโ”€โ”€ auth/ +โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ components/ +โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ hooks/ +โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ actions.ts # Server Actions +โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ queries.ts # Data fetching +โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ types.ts +โ”‚ โ”‚ โ”œโ”€โ”€ products/ +โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ components/ +โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ actions.ts +โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ queries.ts +โ”‚ โ”‚ โ””โ”€โ”€ cart/ +โ”‚ โ”‚ โ””โ”€โ”€ ... +โ”‚ โ”‚ +โ”‚ โ”œโ”€โ”€ shared/ # Shared utilities +โ”‚ โ”‚ โ”œโ”€โ”€ components/ui/ # Reusable UI components +โ”‚ โ”‚ โ”œโ”€โ”€ lib/ # Utils, helpers +โ”‚ โ”‚ โ””โ”€โ”€ hooks/ # Global hooks +โ”‚ โ”‚ +โ”‚ โ””โ”€โ”€ server/ # Server-only code +โ”‚ โ”œโ”€โ”€ db/ # Database client (Prisma) +โ”‚ โ”œโ”€โ”€ auth/ # Auth config +โ”‚ โ””โ”€โ”€ services/ # External API integrations +โ”‚ +โ”œโ”€โ”€ prisma/ +โ”‚ โ”œโ”€โ”€ schema.prisma +โ”‚ โ”œโ”€โ”€ migrations/ +โ”‚ โ””โ”€โ”€ seed.ts +โ”‚ +โ”œโ”€โ”€ public/ +โ”œโ”€โ”€ .env.example +โ”œโ”€โ”€ .env.local +โ”œโ”€โ”€ package.json +โ”œโ”€โ”€ tailwind.config.ts +โ”œโ”€โ”€ tsconfig.json +โ””โ”€โ”€ README.md +``` + +--- + +## Structure Principles + +| Principle | Implementation | +|-----------|----------------| +| **Feature isolation** | Each feature in `features/` with its own components, hooks, actions | +| **Server/Client separation** | Server-only code in `server/`, prevents accidental client imports | +| **Thin routes** | `app/` only for routing, logic lives in `features/` | +| **Route groups** | `(groupName)/` for layout sharing without URL impact | +| **Shared code** | `shared/` for truly reusable UI and utilities | + +--- + +## Core Files + +| File | Purpose | +|------|---------| +| `package.json` | Dependencies | +| `tsconfig.json` | TypeScript + path aliases (`@/features/*`) | +| `tailwind.config.ts` | Tailwind config | +| `.env.example` | Environment template | +| `README.md` | Project documentation | +| `.gitignore` | Git ignore rules | +| `prisma/schema.prisma` | Database schema | + +--- + +## Path Aliases (tsconfig.json) + +```json +{ + "compilerOptions": { + "paths": { + "@/*": ["./src/*"], + "@/features/*": ["./src/features/*"], + "@/shared/*": ["./src/shared/*"], + "@/server/*": ["./src/server/*"] + } + } +} +``` + +--- + +## When to Use What + +| Need | Location | +|------|----------| +| New page/route | `app/(group)/page.tsx` | +| Feature component | `features/[name]/components/` | +| Server action | `features/[name]/actions.ts` | +| Data fetching | `features/[name]/queries.ts` | +| Reusable button/input | `shared/components/ui/` | +| Database query | `server/db/` | +| External API call | `server/services/` | diff --git a/.agent/skills/antigravity-kit/app-builder/tech-stack.md b/.agent/skills/antigravity-kit/app-builder/tech-stack.md new file mode 100644 index 000000000..439299cbc --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/tech-stack.md @@ -0,0 +1,40 @@ +# Tech Stack Selection (2025) + +> Default and alternative technology choices for web applications. + +## Default Stack (Web App - 2025) + +```yaml +Frontend: + framework: Next.js 16 (Stable) + language: TypeScript 5.7+ + styling: Tailwind CSS v4 + state: React 19 Actions / Server Components + bundler: Turbopack (Stable for Dev) + +Backend: + runtime: Node.js 23 + framework: Next.js API Routes / Hono (for Edge) + validation: Zod / TypeBox + +Database: + primary: PostgreSQL + orm: Prisma / Drizzle + hosting: Supabase / Neon + +Auth: + provider: Auth.js (v5) / Clerk + +Monorepo: + tool: Turborepo 2.0 +``` + +## Alternative Options + +| Need | Default | Alternative | +|------|---------|-------------| +| Real-time | - | Supabase Realtime, Socket.io | +| File storage | - | Cloudinary, S3 | +| Payment | Stripe | LemonSqueezy, Paddle | +| Email | - | Resend, SendGrid | +| Search | - | Algolia, Typesense | diff --git a/.agent/skills/antigravity-kit/app-builder/templates/SKILL.md b/.agent/skills/antigravity-kit/app-builder/templates/SKILL.md new file mode 100644 index 000000000..3c077190c --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/templates/SKILL.md @@ -0,0 +1,39 @@ +--- +name: templates +description: Project scaffolding templates for new applications. Use when creating new projects from scratch. Contains 12 templates for various tech stacks. +allowed-tools: Read, Glob, Grep +--- + +# Project Templates + +> Quick-start templates for scaffolding new projects. + +--- + +## ๐ŸŽฏ Selective Reading Rule + +**Read ONLY the template matching user's project type!** + +| Template | Tech Stack | When to Use | +|----------|------------|-------------| +| [nextjs-fullstack](nextjs-fullstack/TEMPLATE.md) | Next.js + Prisma | Full-stack web app | +| [nextjs-saas](nextjs-saas/TEMPLATE.md) | Next.js + Stripe | SaaS product | +| [nextjs-static](nextjs-static/TEMPLATE.md) | Next.js + Framer | Landing page | +| [express-api](express-api/TEMPLATE.md) | Express + JWT | REST API | +| [python-fastapi](python-fastapi/TEMPLATE.md) | FastAPI | Python API | +| [react-native-app](react-native-app/TEMPLATE.md) | Expo + Zustand | Mobile app | +| [flutter-app](flutter-app/TEMPLATE.md) | Flutter + Riverpod | Cross-platform | +| [electron-desktop](electron-desktop/TEMPLATE.md) | Electron + React | Desktop app | +| [chrome-extension](chrome-extension/TEMPLATE.md) | Chrome MV3 | Browser extension | +| [cli-tool](cli-tool/TEMPLATE.md) | Node.js + Commander | CLI app | +| [monorepo-turborepo](monorepo-turborepo/TEMPLATE.md) | Turborepo + pnpm | Monorepo | +| [astro-static](astro-static/TEMPLATE.md) | Astro + MDX | Blog / Docs | + +--- + +## Usage + +1. User says "create [type] app" +2. Match to appropriate template +3. Read ONLY that template's TEMPLATE.md +4. Follow its tech stack and structure diff --git a/.agent/skills/antigravity-kit/app-builder/templates/astro-static/TEMPLATE.md b/.agent/skills/antigravity-kit/app-builder/templates/astro-static/TEMPLATE.md new file mode 100644 index 000000000..cd14084c3 --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/templates/astro-static/TEMPLATE.md @@ -0,0 +1,76 @@ +--- +name: astro-static +description: Astro static site template principles. Content-focused websites, blogs, documentation. +--- + +# Astro Static Site Template + +## Tech Stack + +| Component | Technology | +|-----------|------------| +| Framework | Astro 4.x | +| Content | MDX + Content Collections | +| Styling | Tailwind CSS | +| Integrations | Sitemap, RSS, SEO | +| Output | Static/SSG | + +--- + +## Directory Structure + +``` +project-name/ +โ”œโ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ components/ # .astro components +โ”‚ โ”œโ”€โ”€ content/ # MDX content +โ”‚ โ”‚ โ”œโ”€โ”€ blog/ +โ”‚ โ”‚ โ””โ”€โ”€ config.ts # Collection schemas +โ”‚ โ”œโ”€โ”€ layouts/ # Page layouts +โ”‚ โ”œโ”€โ”€ pages/ # File-based routing +โ”‚ โ””โ”€โ”€ styles/ +โ”œโ”€โ”€ public/ # Static assets +โ”œโ”€โ”€ astro.config.mjs +โ””โ”€โ”€ package.json +``` + +--- + +## Key Concepts + +| Concept | Description | +|---------|-------------| +| Content Collections | Type-safe content with Zod schemas | +| Islands Architecture | Partial hydration for interactivity | +| Zero JS by default | Static HTML unless needed | +| MDX Support | Markdown with components | + +--- + +## Setup Steps + +1. `npm create astro@latest {{name}}` +2. Add integrations: `npx astro add mdx tailwind sitemap` +3. Configure `astro.config.mjs` +4. Create content collections +5. `npm run dev` + +--- + +## Deployment + +| Platform | Method | +|----------|--------| +| Vercel | Auto-detected | +| Netlify | Auto-detected | +| Cloudflare Pages | Auto-detected | +| GitHub Pages | Build + deploy action | + +--- + +## Best Practices + +- Use Content Collections for type safety +- Leverage static generation +- Add islands only where needed +- Optimize images with Astro Image diff --git a/.agent/skills/antigravity-kit/app-builder/templates/chrome-extension/TEMPLATE.md b/.agent/skills/antigravity-kit/app-builder/templates/chrome-extension/TEMPLATE.md new file mode 100644 index 000000000..18cdc9e4f --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/templates/chrome-extension/TEMPLATE.md @@ -0,0 +1,92 @@ +--- +name: chrome-extension +description: Chrome Extension template principles. Manifest V3, React, TypeScript. +--- + +# Chrome Extension Template + +## Tech Stack + +| Component | Technology | +|-----------|------------| +| Manifest | V3 | +| UI | React 18 | +| Language | TypeScript | +| Styling | Tailwind CSS | +| Bundler | Vite | +| Storage | Chrome Storage API | + +--- + +## Directory Structure + +``` +project-name/ +โ”œโ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ popup/ # Extension popup +โ”‚ โ”œโ”€โ”€ options/ # Options page +โ”‚ โ”œโ”€โ”€ background/ # Service worker +โ”‚ โ”œโ”€โ”€ content/ # Content scripts +โ”‚ โ”œโ”€โ”€ components/ +โ”‚ โ”œโ”€โ”€ hooks/ +โ”‚ โ””โ”€โ”€ lib/ +โ”‚ โ”œโ”€โ”€ storage.ts # Chrome storage helpers +โ”‚ โ””โ”€โ”€ messaging.ts # Message passing +โ”œโ”€โ”€ public/ +โ”‚ โ”œโ”€โ”€ icons/ +โ”‚ โ””โ”€โ”€ manifest.json +โ””โ”€โ”€ package.json +``` + +--- + +## Manifest V3 Concepts + +| Component | Purpose | +|-----------|---------| +| Service Worker | Background processing | +| Content Scripts | Page injection | +| Popup | User interface | +| Options Page | Settings | + +--- + +## Permissions + +| Permission | Use | +|------------|-----| +| storage | Save user data | +| activeTab | Current tab access | +| scripting | Inject scripts | +| host_permissions | Site access | + +--- + +## Setup Steps + +1. `npm create vite {{name}} -- --template react-ts` +2. Add Chrome types: `npm install -D @types/chrome` +3. Configure Vite for multi-entry +4. Create manifest.json +5. `npm run dev` (watch mode) +6. Load in Chrome: `chrome://extensions` โ†’ Load unpacked + +--- + +## Development Tips + +| Task | Method | +|------|--------| +| Debug Popup | Right-click icon โ†’ Inspect | +| Debug Background | Extensions page โ†’ Service worker | +| Debug Content | DevTools console on page | +| Hot Reload | `npm run dev` with watch | + +--- + +## Best Practices + +- Use type-safe messaging +- Wrap Chrome APIs in promises +- Minimize permissions +- Handle offline gracefully diff --git a/.agent/skills/antigravity-kit/app-builder/templates/cli-tool/TEMPLATE.md b/.agent/skills/antigravity-kit/app-builder/templates/cli-tool/TEMPLATE.md new file mode 100644 index 000000000..5011162ca --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/templates/cli-tool/TEMPLATE.md @@ -0,0 +1,88 @@ +--- +name: cli-tool +description: Node.js CLI tool template principles. Commander.js, interactive prompts. +--- + +# CLI Tool Template + +## Tech Stack + +| Component | Technology | +|-----------|------------| +| Runtime | Node.js 20+ | +| Language | TypeScript | +| CLI Framework | Commander.js | +| Prompts | Inquirer.js | +| Output | chalk + ora | +| Config | cosmiconfig | + +--- + +## Directory Structure + +``` +project-name/ +โ”œโ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ index.ts # Entry point +โ”‚ โ”œโ”€โ”€ cli.ts # CLI setup +โ”‚ โ”œโ”€โ”€ commands/ # Command handlers +โ”‚ โ”œโ”€โ”€ lib/ +โ”‚ โ”‚ โ”œโ”€โ”€ config.ts # Config loader +โ”‚ โ”‚ โ””โ”€โ”€ logger.ts # Styled output +โ”‚ โ””โ”€โ”€ types/ +โ”œโ”€โ”€ bin/ +โ”‚ โ””โ”€โ”€ cli.js # Executable +โ””โ”€โ”€ package.json +``` + +--- + +## CLI Design Principles + +| Principle | Description | +|-----------|-------------| +| Subcommands | Group related actions | +| Options | Flags with defaults | +| Interactive | Prompts when needed | +| Non-interactive | Support --yes flags | + +--- + +## Key Components + +| Component | Purpose | +|-----------|---------| +| Commander | Command parsing | +| Inquirer | Interactive prompts | +| Chalk | Colored output | +| Ora | Spinners/loading | +| Cosmiconfig | Config file discovery | + +--- + +## Setup Steps + +1. Create project directory +2. `npm init -y` +3. Install deps: `npm install commander @inquirer/prompts chalk ora cosmiconfig` +4. Configure bin in package.json +5. `npm link` for local testing + +--- + +## Publishing + +```bash +npm login +npm publish +``` + +--- + +## Best Practices + +- Provide helpful error messages +- Support both interactive and non-interactive modes +- Use consistent output styling +- Validate inputs with Zod +- Exit with proper codes (0 success, 1 error) diff --git a/.agent/skills/antigravity-kit/app-builder/templates/electron-desktop/TEMPLATE.md b/.agent/skills/antigravity-kit/app-builder/templates/electron-desktop/TEMPLATE.md new file mode 100644 index 000000000..cc65c97b8 --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/templates/electron-desktop/TEMPLATE.md @@ -0,0 +1,88 @@ +--- +name: electron-desktop +description: Electron desktop app template principles. Cross-platform, React, TypeScript. +--- + +# Electron Desktop App Template + +## Tech Stack + +| Component | Technology | +|-----------|------------| +| Framework | Electron 28+ | +| UI | React 18 | +| Language | TypeScript | +| Styling | Tailwind CSS | +| Bundler | Vite + electron-builder | +| IPC | Type-safe communication | + +--- + +## Directory Structure + +``` +project-name/ +โ”œโ”€โ”€ electron/ +โ”‚ โ”œโ”€โ”€ main.ts # Main process +โ”‚ โ”œโ”€โ”€ preload.ts # Preload script +โ”‚ โ””โ”€โ”€ ipc/ # IPC handlers +โ”œโ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ App.tsx +โ”‚ โ”œโ”€โ”€ components/ +โ”‚ โ”‚ โ”œโ”€โ”€ TitleBar.tsx # Custom title bar +โ”‚ โ”‚ โ””โ”€โ”€ ... +โ”‚ โ””โ”€โ”€ hooks/ +โ”œโ”€โ”€ public/ +โ””โ”€โ”€ package.json +``` + +--- + +## Process Model + +| Process | Role | +|---------|------| +| Main | Node.js, system access | +| Renderer | Chromium, React UI | +| Preload | Bridge, context isolation | + +--- + +## Key Concepts + +| Concept | Purpose | +|---------|---------| +| contextBridge | Safe API exposure | +| ipcMain/ipcRenderer | Process communication | +| nodeIntegration: false | Security | +| contextIsolation: true | Security | + +--- + +## Setup Steps + +1. `npm create vite {{name}} -- --template react-ts` +2. Install: `npm install -D electron electron-builder vite-plugin-electron` +3. Create electron/ directory +4. Configure main process +5. `npm run electron:dev` + +--- + +## Build Targets + +| Platform | Output | +|----------|--------| +| Windows | NSIS, Portable | +| macOS | DMG, ZIP | +| Linux | AppImage, DEB | + +--- + +## Best Practices + +- Use preload script for main/renderer bridge +- Type-safe IPC with typed handlers +- Custom title bar for native feel +- Handle window state (maximize, minimize) +- Auto-updates with electron-updater diff --git a/.agent/skills/antigravity-kit/app-builder/templates/express-api/TEMPLATE.md b/.agent/skills/antigravity-kit/app-builder/templates/express-api/TEMPLATE.md new file mode 100644 index 000000000..738d036f6 --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/templates/express-api/TEMPLATE.md @@ -0,0 +1,83 @@ +--- +name: express-api +description: Express.js REST API template principles. TypeScript, Prisma, JWT. +--- + +# Express.js API Template + +## Tech Stack + +| Component | Technology | +|-----------|------------| +| Runtime | Node.js 20+ | +| Framework | Express.js | +| Language | TypeScript | +| Database | PostgreSQL + Prisma | +| Validation | Zod | +| Auth | JWT + bcrypt | + +--- + +## Directory Structure + +``` +project-name/ +โ”œโ”€โ”€ prisma/ +โ”‚ โ””โ”€โ”€ schema.prisma +โ”œโ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ app.ts # Express setup +โ”‚ โ”œโ”€โ”€ config/ # Environment +โ”‚ โ”œโ”€โ”€ routes/ # Route handlers +โ”‚ โ”œโ”€โ”€ controllers/ # Business logic +โ”‚ โ”œโ”€โ”€ services/ # Data access +โ”‚ โ”œโ”€โ”€ middleware/ +โ”‚ โ”‚ โ”œโ”€โ”€ auth.ts # JWT verify +โ”‚ โ”‚ โ”œโ”€โ”€ error.ts # Error handler +โ”‚ โ”‚ โ””โ”€โ”€ validate.ts # Zod validation +โ”‚ โ”œโ”€โ”€ schemas/ # Zod schemas +โ”‚ โ””โ”€โ”€ utils/ +โ””โ”€โ”€ package.json +``` + +--- + +## Middleware Stack + +| Order | Middleware | +|-------|------------| +| 1 | helmet (security) | +| 2 | cors | +| 3 | morgan (logging) | +| 4 | body parsing | +| 5 | routes | +| 6 | error handler | + +--- + +## API Response Format + +| Type | Structure | +|------|-----------| +| Success | `{ success: true, data: {...} }` | +| Error | `{ error: "message", details: [...] }` | + +--- + +## Setup Steps + +1. Create project directory +2. `npm init -y` +3. Install deps: `npm install express prisma zod bcrypt jsonwebtoken` +4. Configure Prisma +5. `npm run db:push` +6. `npm run dev` + +--- + +## Best Practices + +- Layer architecture (routes โ†’ controllers โ†’ services) +- Validate all inputs with Zod +- Centralized error handling +- Environment-based config +- Use Prisma for type-safe DB access diff --git a/.agent/skills/antigravity-kit/app-builder/templates/flutter-app/TEMPLATE.md b/.agent/skills/antigravity-kit/app-builder/templates/flutter-app/TEMPLATE.md new file mode 100644 index 000000000..f86b8bc1c --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/templates/flutter-app/TEMPLATE.md @@ -0,0 +1,90 @@ +--- +name: flutter-app +description: Flutter mobile app template principles. Riverpod, Go Router, clean architecture. +--- + +# Flutter App Template + +## Tech Stack + +| Component | Technology | +|-----------|------------| +| Framework | Flutter 3.x | +| Language | Dart 3.x | +| State | Riverpod 2.0 | +| Navigation | Go Router | +| HTTP | Dio | +| Storage | Hive | + +--- + +## Directory Structure + +``` +project_name/ +โ”œโ”€โ”€ lib/ +โ”‚ โ”œโ”€โ”€ main.dart +โ”‚ โ”œโ”€โ”€ app.dart +โ”‚ โ”œโ”€โ”€ core/ +โ”‚ โ”‚ โ”œโ”€โ”€ constants/ +โ”‚ โ”‚ โ”œโ”€โ”€ theme/ +โ”‚ โ”‚ โ”œโ”€โ”€ router/ +โ”‚ โ”‚ โ””โ”€โ”€ utils/ +โ”‚ โ”œโ”€โ”€ features/ +โ”‚ โ”‚ โ”œโ”€โ”€ auth/ +โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ data/ +โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ domain/ +โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ presentation/ +โ”‚ โ”‚ โ””โ”€โ”€ home/ +โ”‚ โ”œโ”€โ”€ shared/ +โ”‚ โ”‚ โ”œโ”€โ”€ widgets/ +โ”‚ โ”‚ โ””โ”€โ”€ providers/ +โ”‚ โ””โ”€โ”€ services/ +โ”‚ โ”œโ”€โ”€ api/ +โ”‚ โ””โ”€โ”€ storage/ +โ”œโ”€โ”€ test/ +โ””โ”€โ”€ pubspec.yaml +``` + +--- + +## Architecture Layers + +| Layer | Contents | +|-------|----------| +| Presentation | Screens, Widgets, Providers | +| Domain | Entities, Use Cases | +| Data | Repositories, Models | + +--- + +## Key Packages + +| Package | Purpose | +|---------|---------| +| flutter_riverpod | State management | +| riverpod_annotation | Code generation | +| go_router | Navigation | +| dio | HTTP client | +| freezed | Immutable models | +| hive | Local storage | + +--- + +## Setup Steps + +1. `flutter create {{name}} --org com.{{bundle}}` +2. Update `pubspec.yaml` +3. `flutter pub get` +4. Run code generation: `dart run build_runner build` +5. `flutter run` + +--- + +## Best Practices + +- Feature-first folder structure +- Riverpod for state, React Query pattern for server state +- Freezed for immutable data classes +- Go Router for declarative navigation +- Material 3 theming diff --git a/.agent/skills/antigravity-kit/app-builder/templates/monorepo-turborepo/TEMPLATE.md b/.agent/skills/antigravity-kit/app-builder/templates/monorepo-turborepo/TEMPLATE.md new file mode 100644 index 000000000..b47d5b35e --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/templates/monorepo-turborepo/TEMPLATE.md @@ -0,0 +1,90 @@ +--- +name: monorepo-turborepo +description: Turborepo monorepo template principles. pnpm workspaces, shared packages. +--- + +# Turborepo Monorepo Template + +## Tech Stack + +| Component | Technology | +|-----------|------------| +| Build System | Turborepo | +| Package Manager | pnpm | +| Apps | Next.js, Express | +| Packages | Shared UI, Config, Types | +| Language | TypeScript | + +--- + +## Directory Structure + +``` +project-name/ +โ”œโ”€โ”€ apps/ +โ”‚ โ”œโ”€โ”€ web/ # Next.js app +โ”‚ โ”œโ”€โ”€ api/ # Express API +โ”‚ โ””โ”€โ”€ docs/ # Documentation +โ”œโ”€โ”€ packages/ +โ”‚ โ”œโ”€โ”€ ui/ # Shared components +โ”‚ โ”œโ”€โ”€ config/ # ESLint, TS, Tailwind +โ”‚ โ”œโ”€โ”€ types/ # Shared types +โ”‚ โ””โ”€โ”€ utils/ # Shared utilities +โ”œโ”€โ”€ turbo.json +โ”œโ”€โ”€ pnpm-workspace.yaml +โ””โ”€โ”€ package.json +``` + +--- + +## Key Concepts + +| Concept | Description | +|---------|-------------| +| Workspaces | pnpm-workspace.yaml | +| Pipeline | turbo.json task graph | +| Caching | Remote/local task caching | +| Dependencies | `workspace:*` protocol | + +--- + +## Turbo Pipeline + +| Task | Depends On | +|------|------------| +| build | ^build (dependencies first) | +| dev | cache: false, persistent | +| lint | ^build | +| test | ^build | + +--- + +## Setup Steps + +1. Create root directory +2. `pnpm init` +3. Create pnpm-workspace.yaml +4. Create turbo.json +5. Add apps and packages +6. `pnpm install` +7. `pnpm dev` + +--- + +## Common Commands + +| Command | Description | +|---------|-------------| +| `pnpm dev` | Run all apps | +| `pnpm build` | Build all | +| `pnpm --filter @name/web dev` | Run specific app | +| `pnpm --filter @name/web add axios` | Add dep to app | + +--- + +## Best Practices + +- Shared configs in packages/config +- Shared types in packages/types +- Internal packages with `workspace:*` +- Use Turbo remote caching for CI diff --git a/.agent/skills/antigravity-kit/app-builder/templates/nextjs-fullstack/TEMPLATE.md b/.agent/skills/antigravity-kit/app-builder/templates/nextjs-fullstack/TEMPLATE.md new file mode 100644 index 000000000..b86a930bf --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/templates/nextjs-fullstack/TEMPLATE.md @@ -0,0 +1,82 @@ +--- +name: nextjs-fullstack +description: Next.js full-stack template principles. App Router, Prisma, Tailwind. +--- + +# Next.js Full-Stack Template + +## Tech Stack + +| Component | Technology | +|-----------|------------| +| Framework | Next.js 14 (App Router) | +| Language | TypeScript | +| Database | PostgreSQL + Prisma | +| Styling | Tailwind CSS | +| Auth | Clerk (optional) | +| Validation | Zod | + +--- + +## Directory Structure + +``` +project-name/ +โ”œโ”€โ”€ prisma/ +โ”‚ โ””โ”€โ”€ schema.prisma +โ”œโ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ app/ +โ”‚ โ”‚ โ”œโ”€โ”€ layout.tsx +โ”‚ โ”‚ โ”œโ”€โ”€ page.tsx +โ”‚ โ”‚ โ”œโ”€โ”€ globals.css +โ”‚ โ”‚ โ””โ”€โ”€ api/ +โ”‚ โ”œโ”€โ”€ components/ +โ”‚ โ”‚ โ””โ”€โ”€ ui/ +โ”‚ โ”œโ”€โ”€ lib/ +โ”‚ โ”‚ โ”œโ”€โ”€ db.ts # Prisma client +โ”‚ โ”‚ โ””โ”€โ”€ utils.ts +โ”‚ โ””โ”€โ”€ types/ +โ”œโ”€โ”€ .env.example +โ””โ”€โ”€ package.json +``` + +--- + +## Key Concepts + +| Concept | Description | +|---------|-------------| +| Server Components | Default, fetch data | +| Server Actions | Form mutations | +| Route Handlers | API endpoints | +| Prisma | Type-safe ORM | + +--- + +## Environment Variables + +| Variable | Purpose | +|----------|---------| +| DATABASE_URL | Prisma connection | +| NEXT_PUBLIC_APP_URL | Public URL | + +--- + +## Setup Steps + +1. `npx create-next-app {{name}} --typescript --tailwind --app` +2. `npm install prisma @prisma/client zod` +3. `npx prisma init` +4. Configure schema +5. `npm run db:push` +6. `npm run dev` + +--- + +## Best Practices + +- Server Components by default +- Server Actions for mutations +- Prisma for type-safe DB +- Zod for validation +- Edge runtime where possible diff --git a/.agent/skills/antigravity-kit/app-builder/templates/nextjs-saas/TEMPLATE.md b/.agent/skills/antigravity-kit/app-builder/templates/nextjs-saas/TEMPLATE.md new file mode 100644 index 000000000..eb4e09863 --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/templates/nextjs-saas/TEMPLATE.md @@ -0,0 +1,100 @@ +--- +name: nextjs-saas +description: Next.js SaaS template principles. Auth, payments, email. +--- + +# Next.js SaaS Template + +## Tech Stack + +| Component | Technology | +|-----------|------------| +| Framework | Next.js 14 (App Router) | +| Auth | NextAuth.js v5 | +| Payments | Stripe | +| Database | PostgreSQL + Prisma | +| Email | Resend | +| UI | Tailwind (ASK USER: shadcn/Headless UI/Custom?) | + +--- + +## Directory Structure + +``` +project-name/ +โ”œโ”€โ”€ prisma/ +โ”œโ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ app/ +โ”‚ โ”‚ โ”œโ”€โ”€ (auth)/ # Login, register +โ”‚ โ”‚ โ”œโ”€โ”€ (dashboard)/ # Protected routes +โ”‚ โ”‚ โ”œโ”€โ”€ (marketing)/ # Landing, pricing +โ”‚ โ”‚ โ””โ”€โ”€ api/ +โ”‚ โ”‚ โ”œโ”€โ”€ auth/[...nextauth]/ +โ”‚ โ”‚ โ””โ”€โ”€ webhooks/stripe/ +โ”‚ โ”œโ”€โ”€ components/ +โ”‚ โ”‚ โ”œโ”€โ”€ auth/ +โ”‚ โ”‚ โ”œโ”€โ”€ billing/ +โ”‚ โ”‚ โ””โ”€โ”€ dashboard/ +โ”‚ โ”œโ”€โ”€ lib/ +โ”‚ โ”‚ โ”œโ”€โ”€ auth.ts # NextAuth config +โ”‚ โ”‚ โ”œโ”€โ”€ stripe.ts # Stripe client +โ”‚ โ”‚ โ””โ”€โ”€ email.ts # Resend client +โ”‚ โ””โ”€โ”€ config/ +โ”‚ โ””โ”€โ”€ subscriptions.ts +โ””โ”€โ”€ package.json +``` + +--- + +## SaaS Features + +| Feature | Implementation | +|---------|---------------| +| Auth | NextAuth + OAuth | +| Subscriptions | Stripe Checkout | +| Billing Portal | Stripe Portal | +| Webhooks | Stripe events | +| Email | Transactional via Resend | + +--- + +## Database Schema + +| Model | Fields | +|-------|--------| +| User | id, email, stripeCustomerId, subscriptionId | +| Account | OAuth provider data | +| Session | User sessions | + +--- + +## Environment Variables + +| Variable | Purpose | +|----------|---------| +| DATABASE_URL | Prisma | +| NEXTAUTH_SECRET | Auth | +| STRIPE_SECRET_KEY | Payments | +| STRIPE_WEBHOOK_SECRET | Webhooks | +| RESEND_API_KEY | Email | + +--- + +## Setup Steps + +1. `npx create-next-app {{name}} --typescript --tailwind --app` +2. Install: `npm install next-auth @auth/prisma-adapter stripe resend` +3. Setup Stripe products/prices +4. Configure environment +5. `npm run db:push` +6. `npm run stripe:listen` (webhooks) +7. `npm run dev` + +--- + +## Best Practices + +- Route groups for layout separation +- Stripe webhooks for subscription sync +- NextAuth with Prisma adapter +- Email templates with React Email diff --git a/.agent/skills/antigravity-kit/app-builder/templates/nextjs-static/TEMPLATE.md b/.agent/skills/antigravity-kit/app-builder/templates/nextjs-static/TEMPLATE.md new file mode 100644 index 000000000..4c7d1a3f4 --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/templates/nextjs-static/TEMPLATE.md @@ -0,0 +1,106 @@ +--- +name: nextjs-static +description: Next.js static site template principles. Landing pages, portfolios, marketing. +--- + +# Next.js Static Site Template + +## Tech Stack + +| Component | Technology | +|-----------|------------| +| Framework | Next.js 14 (Static Export) | +| Language | TypeScript | +| Styling | Tailwind CSS | +| Animations | Framer Motion | +| Icons | Lucide React | +| SEO | Next SEO | + +--- + +## Directory Structure + +``` +project-name/ +โ”œโ”€โ”€ src/ +โ”‚ โ”œโ”€โ”€ app/ +โ”‚ โ”‚ โ”œโ”€โ”€ layout.tsx +โ”‚ โ”‚ โ”œโ”€โ”€ page.tsx # Landing +โ”‚ โ”‚ โ”œโ”€โ”€ about/ +โ”‚ โ”‚ โ”œโ”€โ”€ contact/ +โ”‚ โ”‚ โ””โ”€โ”€ blog/ +โ”‚ โ”œโ”€โ”€ components/ +โ”‚ โ”‚ โ”œโ”€โ”€ layout/ # Header, Footer +โ”‚ โ”‚ โ”œโ”€โ”€ sections/ # Hero, Features, CTA +โ”‚ โ”‚ โ””โ”€โ”€ ui/ +โ”‚ โ””โ”€โ”€ lib/ +โ”œโ”€โ”€ content/ # Markdown content +โ”œโ”€โ”€ public/ +โ””โ”€โ”€ next.config.js +``` + +--- + +## Static Export Config + +```javascript +// next.config.js +const nextConfig = { + output: 'export', + images: { unoptimized: true }, + trailingSlash: true, +}; +``` + +--- + +## Landing Page Sections + +| Section | Purpose | +|---------|---------| +| Hero | Main headline, CTA | +| Features | Product benefits | +| Testimonials | Social proof | +| Pricing | Plans | +| CTA | Final conversion | + +--- + +## Animation Patterns + +| Pattern | Use | +|---------|-----| +| Fade up | Content entry | +| Stagger | List items | +| Scroll reveal | On viewport | +| Hover | Interactive feedback | + +--- + +## Setup Steps + +1. `npx create-next-app {{name}} --typescript --tailwind --app` +2. Install: `npm install framer-motion lucide-react next-seo` +3. Configure static export +4. Create sections +5. `npm run dev` + +--- + +## Deployment + +| Platform | Method | +|----------|--------| +| Vercel | Auto | +| Netlify | Auto | +| GitHub Pages | gh-pages branch | +| Any host | Upload `out` folder | + +--- + +## Best Practices + +- Static export for maximum performance +- Framer Motion for premium animations +- Responsive mobile-first design +- SEO metadata on every page diff --git a/.agent/skills/antigravity-kit/app-builder/templates/nuxt-app/TEMPLATE.md b/.agent/skills/antigravity-kit/app-builder/templates/nuxt-app/TEMPLATE.md new file mode 100644 index 000000000..ceecafe2c --- /dev/null +++ b/.agent/skills/antigravity-kit/app-builder/templates/nuxt-app/TEMPLATE.md @@ -0,0 +1,101 @@ +--- +name: nuxt-app +description: Nuxt 3 full-stack template. Vue 3, Pinia, Tailwind, Prisma. +--- + +# Nuxt 3 Full-Stack Template + +## Tech Stack + +| Component | Technology | +|-----------|------------| +| Framework | Nuxt 3 | +| Language | TypeScript | +| UI | Vue 3 (Composition API) | +| State | Pinia | +| Database | PostgreSQL + Prisma | +| Styling | Tailwind CSS | +| Validation | Zod | + +--- + +## Directory Structure + +``` +project-name/ +โ”œโ”€โ”€ prisma/ +โ”‚ โ””โ”€โ”€ schema.prisma +โ”œโ”€โ”€ server/ +โ”‚ โ”œโ”€โ”€ api/ +โ”‚ โ”‚ โ””โ”€โ”€ [resource]/ +โ”‚ โ”‚ โ””โ”€โ”€ index.ts +โ”‚ โ””โ”€โ”€ utils/ +โ”‚ โ””โ”€โ”€ db.ts # Prisma client +โ”œโ”€โ”€ composables/ +โ”‚ โ””โ”€โ”€ useAuth.ts +โ”œโ”€โ”€ stores/ +โ”‚ โ””โ”€โ”€ user.ts # Pinia store +โ”œโ”€โ”€ components/ +โ”‚ โ””โ”€โ”€ ui/ +โ”œโ”€โ”€ pages/ +โ”‚ โ”œโ”€โ”€ index.vue +โ”‚ โ””โ”€โ”€ [...slug].vue +โ”œโ”€โ”€ layouts/ +โ”‚ โ””โ”€โ”€ default.vue +โ”œโ”€โ”€ assets/ +โ”‚ โ””โ”€โ”€ css/ +โ”‚ โ””โ”€โ”€ main.css +โ”œโ”€โ”€ .env.example +โ”œโ”€โ”€ nuxt.config.ts +โ””โ”€โ”€ package.json +``` + +--- + +## Key Concepts + +| Concept | Description | +|---------|-------------| +| Auto-imports | Components, composables, utils | +| File-based routing | pages/ โ†’ routes | +| Server Routes | server/api/ โ†’ API endpoints | +| Composables | Reusable reactive logic | +| Pinia | State management | + +--- + +## Environment Variables + +| Variable | Purpose | +|----------|---------| +| DATABASE_URL | Prisma connection | +| NUXT_PUBLIC_APP_URL | Public URL | + +--- + +## Setup Steps + +1. `npx nuxi@latest init {{name}}` +2. `cd {{name}}` +3. `npm install @pinia/nuxt @prisma/client prisma zod` +4. `npm install -D @nuxtjs/tailwindcss` +5. Add modules to `nuxt.config.ts`: + ```ts + modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss'] + ``` +6. `npx prisma init` +7. Configure schema +8. `npx prisma db push` +9. `npm run dev` + +--- + +## Best Practices + +- Use `