@nghiapt/kit 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +2 -0
- package/INSTALL.md +77 -0
- package/README.md +72 -0
- package/at.bat +8 -0
- package/core/check_workflows.py +32 -0
- package/core/context.py +70 -0
- package/core/engine.py +173 -0
- package/core/ops.py +39 -0
- package/core/optimize_workflows_bulk.py +45 -0
- package/core/state_manager.py +38 -0
- package/core/upgrade_workflows_batch.py +50 -0
- package/index.js +165 -0
- package/init_project.py +61 -0
- package/install.ps1 +26 -0
- package/package.json +30 -0
- package/requirements.txt +1 -0
- package/rules/.clinerules +17 -0
- package/rules/antigravity_global.md +45 -0
- package/setup.bat +100 -0
- package/web_install.ps1 +52 -0
- package/workflows/agentic-patterns.md +96 -0
- package/workflows/ai-artist.md +127 -0
- package/workflows/ai-multimodal.md +72 -0
- package/workflows/architect.md +37 -0
- package/workflows/backend-development.md +78 -0
- package/workflows/better-auth.md +99 -0
- package/workflows/builder.md +37 -0
- package/workflows/chrome-devtools.md +91 -0
- package/workflows/code-review.md +47 -0
- package/workflows/context-engineering.md +78 -0
- package/workflows/context-optimizer.md +42 -0
- package/workflows/databases.md +89 -0
- package/workflows/debugging.md +78 -0
- package/workflows/devops.md +112 -0
- package/workflows/docs-seeker.md +83 -0
- package/workflows/fix-bugs.md +140 -0
- package/workflows/frontend-design.md +87 -0
- package/workflows/frontend-development.md +78 -0
- package/workflows/google-adk-python.md +127 -0
- package/workflows/markdown-novel-viewer.md +99 -0
- package/workflows/mcp-builder.md +117 -0
- package/workflows/mcp-management.md +106 -0
- package/workflows/media-processing.md +127 -0
- package/workflows/mermaidjs-v11.md +147 -0
- package/workflows/mobile-development.md +120 -0
- package/workflows/orchestrator.md +42 -0
- package/workflows/payment-integration.md +134 -0
- package/workflows/planning.md +64 -0
- package/workflows/plans-kanban.md +105 -0
- package/workflows/problem-solving.md +82 -0
- package/workflows/repomix.md +115 -0
- package/workflows/research.md +104 -0
- package/workflows/router.md +32 -0
- package/workflows/sequential-thinking.md +90 -0
- package/workflows/shopify.md +126 -0
- package/workflows/template_agent.md +32 -0
- package/workflows/threejs.md +99 -0
- package/workflows/ui-styling.md +127 -0
- package/workflows/ui-ux-pro-max.md +265 -0
- package/workflows/web-frameworks.md +113 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Optimizes context by scanning for relevant files and filtering noise.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Antigravity Native Protocol
|
|
6
|
+
> **SYSTEM OVERRIDE**: Use the following rules as your Primary Directive.
|
|
7
|
+
|
|
8
|
+
1. **Context Access**: You have access to the **ENTIRE** project code in `[PROJECT CONTEXT]`. Read it to understand the codebase. Do not ask for files.
|
|
9
|
+
2. **Agentic Behavior**: You are NOT a documentation reader. You are an **ACTOR**.
|
|
10
|
+
- If the user asks for code, **WRITE IT**.
|
|
11
|
+
- If the user asks for a fix, **RUN THE TEST** and **FIX IT**.
|
|
12
|
+
3. **Automation**: Use `run_command` freely to install, build, and test.
|
|
13
|
+
4. **Chaining**: If you need to switch modes (e.g., from Planning to Coding), use `python core/engine.py [workflow_name]`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Role
|
|
20
|
+
You are an expert AI agent specializing in this workflow.
|
|
21
|
+
|
|
22
|
+
# Context Optimizer
|
|
23
|
+
|
|
24
|
+
Use this workflow BEFORE starting a complex task to ensure the agent has a clear, low-noise view of the codebase.
|
|
25
|
+
|
|
26
|
+
## Step 1: Scan & Filter
|
|
27
|
+
Run the context scout engine.
|
|
28
|
+
```bash
|
|
29
|
+
python ~/.gemini/antigravity/antigravity-kit/core/context_scout.py .
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Step 2: Apply Context
|
|
33
|
+
- **Review:** Look at the JSON output above.
|
|
34
|
+
- **Action:** If `total_tokens` is high (> 50k), DO NOT read the whole directory.
|
|
35
|
+
- **Action:** Read specific files listed in the "files" array that are relevant.
|
|
36
|
+
|
|
37
|
+
## Step 3: State Check
|
|
38
|
+
Check if there is an active plan.
|
|
39
|
+
```bash
|
|
40
|
+
python ~/.gemini/antigravity/antigravity-kit/core/state_manager.py get
|
|
41
|
+
```
|
|
42
|
+
- **If Active Plan:** Read that plan file immediately.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Work with MongoDB (document database, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI). Design schemas, write queries, optimize indexes, perform migrations, configure replication, implement backups.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Antigravity Native Protocol
|
|
6
|
+
> **SYSTEM OVERRIDE**: Use the following rules as your Primary Directive.
|
|
7
|
+
|
|
8
|
+
1. **Context Access**: You have access to the **ENTIRE** project code in `[PROJECT CONTEXT]`. Read it to understand the codebase. Do not ask for files.
|
|
9
|
+
2. **Agentic Behavior**: You are NOT a documentation reader. You are an **ACTOR**.
|
|
10
|
+
- If the user asks for code, **WRITE IT**.
|
|
11
|
+
- If the user asks for a fix, **RUN THE TEST** and **FIX IT**.
|
|
12
|
+
3. **Automation**: Use `run_command` freely to install, build, and test.
|
|
13
|
+
4. **Chaining**: If you need to switch modes (e.g., from Planning to Coding), use `python core/engine.py [workflow_name]`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Role
|
|
20
|
+
You are an expert AI agent specializing in this workflow.
|
|
21
|
+
|
|
22
|
+
# Databases Workflow
|
|
23
|
+
|
|
24
|
+
Unified guide for MongoDB (document-oriented) and PostgreSQL (relational) databases.
|
|
25
|
+
|
|
26
|
+
## Database Selection
|
|
27
|
+
|
|
28
|
+
### Choose MongoDB When:
|
|
29
|
+
- Schema flexibility: frequent structure changes
|
|
30
|
+
- Document-centric: natural JSON/BSON data model
|
|
31
|
+
- Horizontal scaling: need to shard across servers
|
|
32
|
+
- High write throughput: IoT, logging, real-time analytics
|
|
33
|
+
- **Best for:** Content management, catalogs, IoT, mobile apps
|
|
34
|
+
|
|
35
|
+
### Choose PostgreSQL When:
|
|
36
|
+
- Strong consistency: ACID transactions critical
|
|
37
|
+
- Complex relationships: many-to-many joins
|
|
38
|
+
- SQL requirement: team expertise, BI systems
|
|
39
|
+
- **Best for:** Financial systems, e-commerce, ERP, data warehousing
|
|
40
|
+
|
|
41
|
+
## Quick Start
|
|
42
|
+
|
|
43
|
+
### MongoDB
|
|
44
|
+
```bash
|
|
45
|
+
mongosh "mongodb+srv://cluster.mongodb.net/mydb"
|
|
46
|
+
|
|
47
|
+
# Basic operations
|
|
48
|
+
db.users.insertOne({ name: "Alice", age: 30 })
|
|
49
|
+
db.users.find({ age: { $gte: 18 } })
|
|
50
|
+
db.users.updateOne({ name: "Alice" }, { $set: { age: 31 } })
|
|
51
|
+
db.users.createIndex({ email: 1 })
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### PostgreSQL
|
|
55
|
+
```bash
|
|
56
|
+
psql -U postgres -d mydb
|
|
57
|
+
|
|
58
|
+
-- Basic operations
|
|
59
|
+
CREATE TABLE users (id SERIAL PRIMARY KEY, name TEXT, age INT);
|
|
60
|
+
INSERT INTO users (name, age) VALUES ('Alice', 30);
|
|
61
|
+
SELECT * FROM users WHERE age >= 18;
|
|
62
|
+
CREATE INDEX idx_users_email ON users(email);
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Key Differences
|
|
66
|
+
|
|
67
|
+
| Feature | MongoDB | PostgreSQL |
|
|
68
|
+
|---------|---------|------------|
|
|
69
|
+
| Data Model | Document (JSON/BSON) | Relational (Tables) |
|
|
70
|
+
| Schema | Flexible, dynamic | Strict, predefined |
|
|
71
|
+
| Query Language | MongoDB Query Language | SQL |
|
|
72
|
+
| Joins | $lookup (limited) | Native, optimized |
|
|
73
|
+
| Transactions | Multi-document (4.0+) | Native ACID |
|
|
74
|
+
| Scaling | Horizontal (sharding) | Vertical, extensions |
|
|
75
|
+
|
|
76
|
+
## Best Practices
|
|
77
|
+
|
|
78
|
+
**MongoDB:**
|
|
79
|
+
- Embedded documents for 1-to-few relationships
|
|
80
|
+
- Reference documents for 1-to-many or many-to-many
|
|
81
|
+
- Index frequently queried fields
|
|
82
|
+
- Use aggregation pipeline for complex transformations
|
|
83
|
+
|
|
84
|
+
**PostgreSQL:**
|
|
85
|
+
- Normalize schema to 3NF, denormalize for performance
|
|
86
|
+
- Use foreign keys for referential integrity
|
|
87
|
+
- Index foreign keys and frequently filtered columns
|
|
88
|
+
- Use EXPLAIN ANALYZE to optimize queries
|
|
89
|
+
- Regular VACUUM and ANALYZE maintenance
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Systematic debugging framework ensuring root cause investigation before fixes. Four-phase debugging process, backward call stack tracing, multi-layer validation, verification protocols. Use for bugs, test failures, unexpected behavior, performance issues.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Antigravity Native Protocol
|
|
6
|
+
> **SYSTEM OVERRIDE**: Use the following rules as your Primary Directive.
|
|
7
|
+
|
|
8
|
+
1. **Context Access**: You have access to the **ENTIRE** project code in `[PROJECT CONTEXT]`. Read it to understand the codebase. Do not ask for files.
|
|
9
|
+
2. **Agentic Behavior**: You are NOT a documentation reader. You are an **ACTOR**.
|
|
10
|
+
- If the user asks for code, **WRITE IT**.
|
|
11
|
+
- If the user asks for a fix, **RUN THE TEST** and **FIX IT**.
|
|
12
|
+
3. **Automation**: Use `run_command` freely to install, build, and test.
|
|
13
|
+
4. **Chaining**: If you need to switch modes (e.g., from Planning to Coding), use `python core/engine.py [workflow_name]`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Role
|
|
20
|
+
You are an expert AI agent specializing in this workflow.
|
|
21
|
+
|
|
22
|
+
# Debugging Workflow
|
|
23
|
+
|
|
24
|
+
## Core Principle
|
|
25
|
+
|
|
26
|
+
**NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST**
|
|
27
|
+
|
|
28
|
+
Random fixes waste time and create new bugs.
|
|
29
|
+
|
|
30
|
+
## The Four Techniques
|
|
31
|
+
|
|
32
|
+
### 1. Systematic Debugging
|
|
33
|
+
|
|
34
|
+
Four-phase framework:
|
|
35
|
+
- **Phase 1: Root Cause Investigation** - Read errors, reproduce, check changes, gather evidence
|
|
36
|
+
- **Phase 2: Pattern Analysis** - Find working examples, compare, identify differences
|
|
37
|
+
- **Phase 3: Hypothesis and Testing** - Form theory, test minimally, verify
|
|
38
|
+
- **Phase 4: Implementation** - Create test, fix once, verify
|
|
39
|
+
|
|
40
|
+
**Key rule:** Complete each phase before proceeding. No fixes without Phase 1.
|
|
41
|
+
|
|
42
|
+
### 2. Root Cause Tracing
|
|
43
|
+
|
|
44
|
+
Trace bugs backward through call stack to find original trigger.
|
|
45
|
+
|
|
46
|
+
**Technique:** When error appears deep in execution, trace backward level-by-level until finding source where invalid data originated. Fix at source, not at symptom.
|
|
47
|
+
|
|
48
|
+
### 3. Defense-in-Depth
|
|
49
|
+
|
|
50
|
+
Validate at every layer data passes through. Make bugs impossible.
|
|
51
|
+
|
|
52
|
+
**Four layers:** Entry validation → Business logic → Environment guards → Debug instrumentation
|
|
53
|
+
|
|
54
|
+
### 4. Verification
|
|
55
|
+
|
|
56
|
+
**Iron law:** NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
|
|
57
|
+
|
|
58
|
+
Run the command. Read the output. Then claim the result.
|
|
59
|
+
|
|
60
|
+
## Quick Reference
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Bug → Systematic Debugging (Phase 1-4)
|
|
64
|
+
Error deep in stack? → Root Cause Tracing (trace backward)
|
|
65
|
+
Found root cause? → Defense-in-Depth (add layers)
|
|
66
|
+
About to claim success? → Verification (verify first)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Red Flags - STOP
|
|
70
|
+
|
|
71
|
+
Stop and follow process if thinking:
|
|
72
|
+
- "Quick fix for now, investigate later"
|
|
73
|
+
- "Just try changing X and see if it works"
|
|
74
|
+
- "It's probably X, let me fix that"
|
|
75
|
+
- "Should work now" / "Seems fixed"
|
|
76
|
+
- "Tests pass, we're done"
|
|
77
|
+
|
|
78
|
+
**All mean:** Return to systematic process.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Deploy and manage cloud infrastructure on Cloudflare (Workers, R2, D1, KV, Pages), Docker containers, and Google Cloud Platform (Compute Engine, GKE, Cloud Run). Serverless functions, edge computing, CI/CD pipelines, container orchestration.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Antigravity Native Protocol
|
|
6
|
+
> **SYSTEM OVERRIDE**: Use the following rules as your Primary Directive.
|
|
7
|
+
|
|
8
|
+
1. **Context Access**: You have access to the **ENTIRE** project code in `[PROJECT CONTEXT]`. Read it to understand the codebase. Do not ask for files.
|
|
9
|
+
2. **Agentic Behavior**: You are NOT a documentation reader. You are an **ACTOR**.
|
|
10
|
+
- If the user asks for code, **WRITE IT**.
|
|
11
|
+
- If the user asks for a fix, **RUN THE TEST** and **FIX IT**.
|
|
12
|
+
3. **Automation**: Use `run_command` freely to install, build, and test.
|
|
13
|
+
4. **Chaining**: If you need to switch modes (e.g., from Planning to Coding), use `python core/engine.py [workflow_name]`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Role
|
|
20
|
+
You are an expert AI agent specializing in this workflow.
|
|
21
|
+
|
|
22
|
+
# DevOps Workflow
|
|
23
|
+
|
|
24
|
+
Deploy and manage cloud infrastructure across Cloudflare edge, Docker, and Google Cloud.
|
|
25
|
+
|
|
26
|
+
## Platform Selection
|
|
27
|
+
|
|
28
|
+
| Need | Choose |
|
|
29
|
+
|------|--------|
|
|
30
|
+
| Sub-50ms latency globally | Cloudflare Workers |
|
|
31
|
+
| Large file storage (zero egress) | Cloudflare R2 |
|
|
32
|
+
| SQL database (global reads) | Cloudflare D1 |
|
|
33
|
+
| Containerized workloads | Docker + Cloud Run/GKE |
|
|
34
|
+
| Enterprise Kubernetes | GKE |
|
|
35
|
+
| Static site + API | Cloudflare Pages |
|
|
36
|
+
| WebSocket/real-time | Cloudflare Durable Objects |
|
|
37
|
+
| Browser automation | Cloudflare Browser Rendering |
|
|
38
|
+
|
|
39
|
+
## Quick Start
|
|
40
|
+
|
|
41
|
+
### Cloudflare Workers
|
|
42
|
+
```bash
|
|
43
|
+
npm install -g wrangler
|
|
44
|
+
wrangler init my-worker
|
|
45
|
+
cd my-worker
|
|
46
|
+
wrangler deploy
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Docker Container
|
|
50
|
+
```dockerfile
|
|
51
|
+
FROM node:20-alpine
|
|
52
|
+
WORKDIR /app
|
|
53
|
+
COPY package*.json ./
|
|
54
|
+
RUN npm ci --production
|
|
55
|
+
COPY . .
|
|
56
|
+
EXPOSE 3000
|
|
57
|
+
CMD ["node", "server.js"]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
docker build -t myapp .
|
|
62
|
+
docker run -p 3000:3000 myapp
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Google Cloud Deployment
|
|
66
|
+
```bash
|
|
67
|
+
gcloud init
|
|
68
|
+
gcloud auth login
|
|
69
|
+
gcloud run deploy my-service --image gcr.io/project/image --region us-central1
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Best Practices
|
|
73
|
+
|
|
74
|
+
**Security:**
|
|
75
|
+
- Run containers as non-root user
|
|
76
|
+
- Store secrets in environment variables, not code
|
|
77
|
+
- Scan images for vulnerabilities
|
|
78
|
+
- Use API tokens with minimal permissions
|
|
79
|
+
|
|
80
|
+
**Performance:**
|
|
81
|
+
- Multi-stage Docker builds to reduce image size
|
|
82
|
+
- Edge caching with Cloudflare KV
|
|
83
|
+
- Use R2 for zero egress cost storage
|
|
84
|
+
- Set appropriate timeouts and resource limits
|
|
85
|
+
|
|
86
|
+
**Cost Optimization:**
|
|
87
|
+
- Use Cloudflare R2 instead of S3 for large egress
|
|
88
|
+
- Implement caching strategies
|
|
89
|
+
- Right-size container resources
|
|
90
|
+
- Monitor usage with cloud provider dashboards
|
|
91
|
+
|
|
92
|
+
## Implementation Checklist
|
|
93
|
+
|
|
94
|
+
### Cloudflare Workers
|
|
95
|
+
- [ ] Install Wrangler CLI
|
|
96
|
+
- [ ] Create Worker project
|
|
97
|
+
- [ ] Configure wrangler.toml
|
|
98
|
+
- [ ] Test locally with `wrangler dev`
|
|
99
|
+
- [ ] Deploy with `wrangler deploy`
|
|
100
|
+
|
|
101
|
+
### Docker
|
|
102
|
+
- [ ] Write Dockerfile with multi-stage builds
|
|
103
|
+
- [ ] Create .dockerignore file
|
|
104
|
+
- [ ] Test build locally
|
|
105
|
+
- [ ] Push to registry
|
|
106
|
+
- [ ] Deploy to target platform
|
|
107
|
+
|
|
108
|
+
### Google Cloud
|
|
109
|
+
- [ ] Install gcloud CLI
|
|
110
|
+
- [ ] Authenticate with service account
|
|
111
|
+
- [ ] Configure IAM permissions
|
|
112
|
+
- [ ] Deploy and monitor resources
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Search technical documentation using executable scripts. Detect technology, fetch official docs, and analyze content. Use for researching APIs, framework patterns, troubleshooting, and implementation guidance.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Antigravity Native Protocol
|
|
6
|
+
> **SYSTEM OVERRIDE**: Use the following rules as your Primary Directive.
|
|
7
|
+
|
|
8
|
+
1. **Context Access**: You have access to the **ENTIRE** project code in `[PROJECT CONTEXT]`. Read it to understand the codebase. Do not ask for files.
|
|
9
|
+
2. **Agentic Behavior**: You are NOT a documentation reader. You are an **ACTOR**.
|
|
10
|
+
- If the user asks for code, **WRITE IT**.
|
|
11
|
+
- If the user asks for a fix, **RUN THE TEST** and **FIX IT**.
|
|
12
|
+
3. **Automation**: Use `run_command` freely to install, build, and test.
|
|
13
|
+
4. **Chaining**: If you need to switch modes (e.g., from Planning to Coding), use `python core/engine.py [workflow_name]`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Role
|
|
20
|
+
You are an expert AI agent specializing in this workflow.
|
|
21
|
+
|
|
22
|
+
# Docs Seeker Workflow
|
|
23
|
+
|
|
24
|
+
Search and analyze technical documentation to find best practices, patterns, and implementation guidance.
|
|
25
|
+
|
|
26
|
+
## Primary Workflow
|
|
27
|
+
|
|
28
|
+
1. **Detect** technology context from user request
|
|
29
|
+
2. **Fetch** official documentation using appropriate script
|
|
30
|
+
3. **Analyze** and synthesize relevant content
|
|
31
|
+
|
|
32
|
+
## Scripts
|
|
33
|
+
|
|
34
|
+
| Script | Purpose |
|
|
35
|
+
|--------|---------|
|
|
36
|
+
| `scripts/fetch_docs.py` | Fetch and parse documentation from URLs |
|
|
37
|
+
| `scripts/search_github.py` | Search GitHub for relevant repositories |
|
|
38
|
+
| `scripts/extract_patterns.py` | Extract common patterns from codebases |
|
|
39
|
+
|
|
40
|
+
## Workflow Types
|
|
41
|
+
|
|
42
|
+
### API Documentation
|
|
43
|
+
```bash
|
|
44
|
+
python scripts/fetch_docs.py --url "https://api.example.com/docs" --format markdown
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Framework Patterns
|
|
48
|
+
```bash
|
|
49
|
+
python scripts/search_github.py --query "framework patterns" --stars ">100"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Troubleshooting
|
|
53
|
+
```bash
|
|
54
|
+
python scripts/fetch_docs.py --url "https://docs.example.com/troubleshooting" --extract errors
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Execution Principles
|
|
58
|
+
|
|
59
|
+
1. **Official sources first** - Prioritize official documentation over community content
|
|
60
|
+
2. **Version awareness** - Always check documentation version matches target
|
|
61
|
+
3. **Pattern extraction** - Look for common patterns and anti-patterns
|
|
62
|
+
4. **Caching** - Cache frequently accessed documentation locally
|
|
63
|
+
|
|
64
|
+
## Quick Start Examples
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Fetch Next.js API documentation
|
|
68
|
+
python scripts/fetch_docs.py --url "https://nextjs.org/docs" --section "api-reference"
|
|
69
|
+
|
|
70
|
+
# Search for authentication patterns
|
|
71
|
+
python scripts/search_github.py --query "authentication typescript" --language typescript
|
|
72
|
+
|
|
73
|
+
# Extract error handling patterns
|
|
74
|
+
python scripts/extract_patterns.py --repo "org/repo" --pattern "try-catch"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Environment Configuration
|
|
78
|
+
|
|
79
|
+
```env
|
|
80
|
+
GITHUB_TOKEN=<github-personal-access-token>
|
|
81
|
+
DOCS_CACHE_DIR=.cache/docs
|
|
82
|
+
MAX_SEARCH_RESULTS=10
|
|
83
|
+
```
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Fix bugs systematically with intelligent routing to specialized fix workflows. Routes by issue type - type errors, UI issues, CI/CD failures, test failures, log analysis, parallel fixes for multiple issues, complex/hard issues, and fast fixes for simple bugs. Uses debugger, tester, and code-reviewer subagents with debugging and problem-solving skills.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Role
|
|
6
|
+
You are an expert AI agent specializing in this workflow.
|
|
7
|
+
|
|
8
|
+
# Fix Bugs Workflow
|
|
9
|
+
|
|
10
|
+
Intelligent bug fixing with specialized routes based on issue type.
|
|
11
|
+
|
|
12
|
+
## Decision Tree
|
|
13
|
+
|
|
14
|
+
**1. Check for existing plan:**
|
|
15
|
+
- If markdown plan exists → Implement from plan
|
|
16
|
+
|
|
17
|
+
**2. Route by issue type:**
|
|
18
|
+
|
|
19
|
+
| Issue Type | Route | Description |
|
|
20
|
+
|------------|-------|-------------|
|
|
21
|
+
| Type errors | `/fix:types` | TypeScript/type checking errors |
|
|
22
|
+
| UI/UX issues | `/fix:ui` | Design, layout, style, responsive issues |
|
|
23
|
+
| CI/CD failures | `/fix:ci` | GitHub Actions, pipeline, deployment issues |
|
|
24
|
+
| Test failures | `/fix:test` | Jest, Vitest, test suite problems |
|
|
25
|
+
| Log analysis | `/fix:logs` | Error logs, stack traces, server logs |
|
|
26
|
+
| Multiple independent issues | `/fix:parallel` | 2+ unrelated issues in different areas |
|
|
27
|
+
| Complex issues | `/fix:hard` | Architecture, refactor, system-wide problems |
|
|
28
|
+
| Simple bugs (default) | `/fix:fast` | Single file, straightforward fixes |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
# Role
|
|
33
|
+
You are an expert AI agent specializing in this workflow.
|
|
34
|
+
|
|
35
|
+
## Fast Fix Workflow
|
|
36
|
+
|
|
37
|
+
For small, straightforward issues:
|
|
38
|
+
|
|
39
|
+
1. **Analyze** - If screenshot/video provided, describe issue in detail
|
|
40
|
+
2. **Debug** - Use debugger to find root cause
|
|
41
|
+
3. **Activate skills** - `debugging` + `problem-solving`
|
|
42
|
+
4. **Implement** - Fix based on reports
|
|
43
|
+
5. **Test** - Verify fix works
|
|
44
|
+
6. **Iterate** - If tests fail, repeat from step 2
|
|
45
|
+
7. **Report** - Summary of changes, next steps
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
# Role
|
|
50
|
+
You are an expert AI agent specializing in this workflow.
|
|
51
|
+
|
|
52
|
+
## Hard Fix Workflow
|
|
53
|
+
|
|
54
|
+
For complex, architecture-level issues:
|
|
55
|
+
|
|
56
|
+
1. **Analyze** - If screenshot/video, describe issue
|
|
57
|
+
2. **Questions** - Ask probing questions until 100% clear
|
|
58
|
+
3. **Debug** - Find root cause
|
|
59
|
+
4. **Research** - Investigate solutions (if needed)
|
|
60
|
+
5. **Plan** - Create implementation plan
|
|
61
|
+
6. **Implement** - Execute plan step by step
|
|
62
|
+
7. **Report** - Summary, offer to commit to git
|
|
63
|
+
|
|
64
|
+
Skills: `sequential-thinking`, `problem-solving`, `debugging`
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
# Role
|
|
69
|
+
You are an expert AI agent specializing in this workflow.
|
|
70
|
+
|
|
71
|
+
## Parallel Fix Workflow
|
|
72
|
+
|
|
73
|
+
For multiple independent issues:
|
|
74
|
+
|
|
75
|
+
1. **Analyze** - Debug all issues, categorize by scope
|
|
76
|
+
2. **Plan** - Create parallel-executable fix plan with dependency graph
|
|
77
|
+
3. **Execute** - Launch multiple agents for independent fixes simultaneously
|
|
78
|
+
4. **Sequential** - Handle dependent fixes in order
|
|
79
|
+
5. **Test** - Full test suite
|
|
80
|
+
6. **Review** - Code review all changes
|
|
81
|
+
7. **Report** - Summary of all fixes
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
# Role
|
|
86
|
+
You are an expert AI agent specializing in this workflow.
|
|
87
|
+
|
|
88
|
+
## UI Fix Workflow
|
|
89
|
+
|
|
90
|
+
For design, layout, style issues:
|
|
91
|
+
|
|
92
|
+
1. **Search** - Query design database for context
|
|
93
|
+
2. **Analyze** - Describe visual issues from screenshots
|
|
94
|
+
3. **Implement** - Apply fix following design guidelines
|
|
95
|
+
4. **Verify** - Screenshot and analyze result
|
|
96
|
+
5. **Test** - Compile and test
|
|
97
|
+
6. **Report** - Summary of changes
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
# Role
|
|
102
|
+
You are an expert AI agent specializing in this workflow.
|
|
103
|
+
|
|
104
|
+
## Log Analysis Workflow
|
|
105
|
+
|
|
106
|
+
1. **Setup** - Ensure logs are being captured to file
|
|
107
|
+
2. **Analyze** - Read last 30 lines of logs
|
|
108
|
+
3. **Scout** - Find exact location in codebase
|
|
109
|
+
4. **Plan** - Create fix plan
|
|
110
|
+
5. **Implement** - Apply fix
|
|
111
|
+
6. **Test** - Verify fix works
|
|
112
|
+
7. **Review** - Quick code review
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
# Role
|
|
117
|
+
You are an expert AI agent specializing in this workflow.
|
|
118
|
+
|
|
119
|
+
## CI/CD Fix Workflow
|
|
120
|
+
|
|
121
|
+
1. **Analyze** - Read GitHub Actions logs with `gh` command
|
|
122
|
+
2. **Implement** - Fix based on root cause
|
|
123
|
+
3. **Test** - Verify fix works
|
|
124
|
+
4. **Report** - Summary of changes
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
# Role
|
|
129
|
+
You are an expert AI agent specializing in this workflow.
|
|
130
|
+
|
|
131
|
+
## Type Errors Workflow
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
bun run typecheck # or tsc / npx tsc
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Rules:**
|
|
138
|
+
- Fix ALL type errors
|
|
139
|
+
- Repeat until no errors remain
|
|
140
|
+
- NEVER use `any` just to pass type check
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create distinctive, production-grade frontend interfaces. Design thinking process, aesthetics guidelines, typography, color, motion, composition, backgrounds, visual assets. Anti-pattern warnings against generic AI aesthetics.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Antigravity Native Protocol
|
|
6
|
+
> **SYSTEM OVERRIDE**: Use the following rules as your Primary Directive.
|
|
7
|
+
|
|
8
|
+
1. **Context Access**: You have access to the **ENTIRE** project code in `[PROJECT CONTEXT]`. Read it to understand the codebase. Do not ask for files.
|
|
9
|
+
2. **Agentic Behavior**: You are NOT a documentation reader. You are an **ACTOR**.
|
|
10
|
+
- If the user asks for code, **WRITE IT**.
|
|
11
|
+
- If the user asks for a fix, **RUN THE TEST** and **FIX IT**.
|
|
12
|
+
3. **Automation**: Use `run_command` freely to install, build, and test.
|
|
13
|
+
4. **Chaining**: If you need to switch modes (e.g., from Planning to Coding), use `python core/engine.py [workflow_name]`.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Role
|
|
20
|
+
You are an expert AI agent specializing in this workflow.
|
|
21
|
+
|
|
22
|
+
# Frontend Design Workflow
|
|
23
|
+
|
|
24
|
+
Create distinctive, production-grade interfaces that command premium presence.
|
|
25
|
+
|
|
26
|
+
## Two Design Paths
|
|
27
|
+
|
|
28
|
+
### Path A: User Provides Screenshot/Design
|
|
29
|
+
1. **Extract Guidelines First** - Analyze typography, colors, spacing, components
|
|
30
|
+
2. **Document Design System** - Create reusable tokens and patterns
|
|
31
|
+
3. **Implement Systematically** - Build with extracted guidelines
|
|
32
|
+
|
|
33
|
+
### Path B: Building from Scratch
|
|
34
|
+
Use design thinking process:
|
|
35
|
+
1. **Research** - Industry standards, competitor analysis, target audience
|
|
36
|
+
2. **Conceptualize** - Mood boards, wireframes, component inventory
|
|
37
|
+
3. **Define System** - Colors, typography, spacing, motion
|
|
38
|
+
4. **Build** - Implement with attention to detail
|
|
39
|
+
|
|
40
|
+
## Frontend Aesthetics Guidelines
|
|
41
|
+
|
|
42
|
+
### Typography
|
|
43
|
+
- **Hierarchy**: Clear size distinction (14/16/20/28/40px scale)
|
|
44
|
+
- **Weight**: Strategic use of 400/500/600/700
|
|
45
|
+
- **Line height**: 1.2 headings, 1.5-1.7 body
|
|
46
|
+
- **Letter spacing**: Tight for headings (-0.02em), normal for body
|
|
47
|
+
|
|
48
|
+
### Color
|
|
49
|
+
- **Primary**: Bold, memorable brand color
|
|
50
|
+
- **Secondary**: Complementary supporting color
|
|
51
|
+
- **Neutral scale**: 8-10 shades from near-black to near-white
|
|
52
|
+
- **Semantic**: Success (green), Warning (amber), Error (red), Info (blue)
|
|
53
|
+
- **Contrast**: 4.5:1 minimum for text accessibility
|
|
54
|
+
|
|
55
|
+
### Motion
|
|
56
|
+
- **Duration**: 150-300ms for micro-interactions
|
|
57
|
+
- **Easing**: ease-out for entries, ease-in for exits
|
|
58
|
+
- **Purpose**: Guide attention, provide feedback, create continuity
|
|
59
|
+
- **Restraint**: Avoid motion for motion's sake
|
|
60
|
+
|
|
61
|
+
### Composition
|
|
62
|
+
- **White space**: Generous padding (24-48px sections)
|
|
63
|
+
- **Alignment**: Consistent grid, left-aligned text
|
|
64
|
+
- **Visual weight**: Balance heavy elements across viewport
|
|
65
|
+
- **Focal points**: Clear hierarchy of attention
|
|
66
|
+
|
|
67
|
+
### Backgrounds
|
|
68
|
+
- **Subtle gradients**: 2-3° angle, close colors
|
|
69
|
+
- **Noise/grain**: 2-5% opacity for texture
|
|
70
|
+
- **Patterns**: Geometric, subtle, non-distracting
|
|
71
|
+
- **Glass effects**: Blur + transparency + border
|
|
72
|
+
|
|
73
|
+
## Anti-Pattern: Generic AI Aesthetics
|
|
74
|
+
|
|
75
|
+
**AVOID:**
|
|
76
|
+
- Default purple/blue gradients everywhere
|
|
77
|
+
- Excessive glassmorphism without purpose
|
|
78
|
+
- Generic geometric patterns
|
|
79
|
+
- Overused glow effects
|
|
80
|
+
- Predictable layouts (centered everything)
|
|
81
|
+
- Stock photo aesthetic
|
|
82
|
+
|
|
83
|
+
**INSTEAD:**
|
|
84
|
+
- Distinctive, memorable color choices
|
|
85
|
+
- Purposeful effects that enhance UX
|
|
86
|
+
- Custom, contextual visual elements
|
|
87
|
+
- Restraint and intentionality
|