@musashishao/agent-kit 1.1.5 โ 1.1.6
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.
Potentially problematic release.
This version of @musashishao/agent-kit might be problematic. Click here for more details.
- package/.agent/plans/codex-cli-integration.md +128 -277
- package/.agent/rules/CODEX.md +250 -0
- package/.agent/skills/context-engineering/scripts/quality_validator.py +294 -0
- package/.agent/skills/context-engineering/scripts/skill_checker.py +194 -0
- package/.agent/templates/AGENTS.backend.md +230 -0
- package/.agent/templates/AGENTS.md +121 -0
- package/.agent/templates/AGENTS.mobile.md +183 -0
- package/.agent/templates/AGENTS.web.md +192 -0
- package/.agent/workflows/quality.md +89 -0
- package/.agent/workflows/ui-ux-pro-max.md +19 -0
- package/README.md +172 -44
- package/bin/cli.js +287 -7
- package/package.json +1 -1
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Skill Quality Checker
|
|
4
|
+
Analyzes skills for quality and completeness.
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
python skill_checker.py [skill_name]
|
|
8
|
+
python skill_checker.py --all
|
|
9
|
+
|
|
10
|
+
Example:
|
|
11
|
+
python skill_checker.py react-patterns
|
|
12
|
+
python skill_checker.py --all
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import os
|
|
16
|
+
import sys
|
|
17
|
+
import re
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
from typing import Dict, List, Optional
|
|
20
|
+
|
|
21
|
+
# ANSI colors
|
|
22
|
+
class Colors:
|
|
23
|
+
RED = '\033[91m'
|
|
24
|
+
GREEN = '\033[92m'
|
|
25
|
+
YELLOW = '\033[93m'
|
|
26
|
+
BLUE = '\033[94m'
|
|
27
|
+
MAGENTA = '\033[95m'
|
|
28
|
+
CYAN = '\033[96m'
|
|
29
|
+
RESET = '\033[0m'
|
|
30
|
+
BOLD = '\033[1m'
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class SkillChecker:
|
|
34
|
+
"""Check skill quality and completeness"""
|
|
35
|
+
|
|
36
|
+
REQUIRED_FRONTMATTER = ["name", "description"]
|
|
37
|
+
RECOMMENDED_FRONTMATTER = ["requirements", "types"]
|
|
38
|
+
RECOMMENDED_SECTIONS = ["Core Philosophy", "How to Apply", "References"]
|
|
39
|
+
|
|
40
|
+
def __init__(self, skills_dir: Path):
|
|
41
|
+
self.skills_dir = skills_dir
|
|
42
|
+
|
|
43
|
+
def check_skill(self, skill_name: str) -> Dict:
|
|
44
|
+
"""Check a single skill"""
|
|
45
|
+
skill_path = self.skills_dir / skill_name
|
|
46
|
+
skill_md = skill_path / "SKILL.md"
|
|
47
|
+
|
|
48
|
+
if not skill_path.exists():
|
|
49
|
+
return {"name": skill_name, "exists": False, "score": 0}
|
|
50
|
+
|
|
51
|
+
result = {
|
|
52
|
+
"name": skill_name,
|
|
53
|
+
"exists": True,
|
|
54
|
+
"checks": [],
|
|
55
|
+
"score": 0
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if not skill_md.exists():
|
|
59
|
+
result["checks"].append(("SKILL.md", False, "Missing"))
|
|
60
|
+
return result
|
|
61
|
+
|
|
62
|
+
content = skill_md.read_text()
|
|
63
|
+
|
|
64
|
+
# Check frontmatter
|
|
65
|
+
frontmatter_match = re.match(r"^---\n(.+?)\n---", content, re.DOTALL)
|
|
66
|
+
if frontmatter_match:
|
|
67
|
+
frontmatter = frontmatter_match.group(1)
|
|
68
|
+
|
|
69
|
+
for field in self.REQUIRED_FRONTMATTER:
|
|
70
|
+
has_field = bool(re.search(rf"^{field}:\s*.+", frontmatter, re.MULTILINE))
|
|
71
|
+
result["checks"].append((f"Frontmatter: {field}", has_field, "Found" if has_field else "Missing (required)"))
|
|
72
|
+
|
|
73
|
+
for field in self.RECOMMENDED_FRONTMATTER:
|
|
74
|
+
has_field = bool(re.search(rf"^{field}:\s*.+", frontmatter, re.MULTILINE))
|
|
75
|
+
if has_field:
|
|
76
|
+
result["checks"].append((f"Frontmatter: {field}", True, "Found"))
|
|
77
|
+
else:
|
|
78
|
+
result["checks"].append(("Frontmatter", False, "Missing YAML frontmatter"))
|
|
79
|
+
|
|
80
|
+
# Check content quality
|
|
81
|
+
word_count = len(content.split())
|
|
82
|
+
has_enough_content = word_count > 100
|
|
83
|
+
result["checks"].append(("Content length", has_enough_content, f"{word_count} words" if has_enough_content else "Too short"))
|
|
84
|
+
|
|
85
|
+
# Check for code examples
|
|
86
|
+
has_code = "```" in content
|
|
87
|
+
result["checks"].append(("Code examples", has_code, "Found" if has_code else "Consider adding"))
|
|
88
|
+
|
|
89
|
+
# Check for recommended sections
|
|
90
|
+
for section in self.RECOMMENDED_SECTIONS:
|
|
91
|
+
has_section = section.lower() in content.lower()
|
|
92
|
+
if has_section:
|
|
93
|
+
result["checks"].append((f"Section: {section}", True, "Found"))
|
|
94
|
+
|
|
95
|
+
# Check for additional files
|
|
96
|
+
additional_files = list(skill_path.glob("**/*"))
|
|
97
|
+
has_scripts = any("script" in str(f).lower() for f in additional_files)
|
|
98
|
+
has_examples = any("example" in str(f).lower() for f in additional_files)
|
|
99
|
+
|
|
100
|
+
if has_scripts:
|
|
101
|
+
result["checks"].append(("Scripts", True, "Has automation scripts"))
|
|
102
|
+
if has_examples:
|
|
103
|
+
result["checks"].append(("Examples", True, "Has examples"))
|
|
104
|
+
|
|
105
|
+
# Calculate score
|
|
106
|
+
passed = sum(1 for _, p, _ in result["checks"] if p)
|
|
107
|
+
total = len(result["checks"])
|
|
108
|
+
result["score"] = (passed / total * 100) if total > 0 else 0
|
|
109
|
+
|
|
110
|
+
return result
|
|
111
|
+
|
|
112
|
+
def check_all(self) -> List[Dict]:
|
|
113
|
+
"""Check all skills"""
|
|
114
|
+
results = []
|
|
115
|
+
|
|
116
|
+
for skill_dir in sorted(self.skills_dir.iterdir()):
|
|
117
|
+
if skill_dir.is_dir():
|
|
118
|
+
result = self.check_skill(skill_dir.name)
|
|
119
|
+
results.append(result)
|
|
120
|
+
|
|
121
|
+
return results
|
|
122
|
+
|
|
123
|
+
def print_result(self, result: Dict):
|
|
124
|
+
"""Print result for a single skill"""
|
|
125
|
+
name = result["name"]
|
|
126
|
+
score = result.get("score", 0)
|
|
127
|
+
|
|
128
|
+
color = Colors.GREEN if score >= 80 else Colors.YELLOW if score >= 60 else Colors.RED
|
|
129
|
+
status = "โ" if score >= 80 else "โ " if score >= 60 else "โ"
|
|
130
|
+
|
|
131
|
+
print(f"\n{Colors.BOLD}{Colors.CYAN}{name}{Colors.RESET} {color}[{score:.0f}%]{Colors.RESET}")
|
|
132
|
+
|
|
133
|
+
for check_name, passed, message in result.get("checks", []):
|
|
134
|
+
status_icon = f"{Colors.GREEN}โ{Colors.RESET}" if passed else f"{Colors.YELLOW}โ{Colors.RESET}"
|
|
135
|
+
print(f" {status_icon} {check_name}: {message}")
|
|
136
|
+
|
|
137
|
+
def print_summary(self, results: List[Dict]):
|
|
138
|
+
"""Print summary of all skills"""
|
|
139
|
+
print(f"\n{Colors.BOLD}{Colors.MAGENTA}๐ Skills Quality Summary{Colors.RESET}\n")
|
|
140
|
+
|
|
141
|
+
excellent = sum(1 for r in results if r.get("score", 0) >= 80)
|
|
142
|
+
good = sum(1 for r in results if 60 <= r.get("score", 0) < 80)
|
|
143
|
+
needs_work = sum(1 for r in results if r.get("score", 0) < 60)
|
|
144
|
+
|
|
145
|
+
print(f" {Colors.GREEN}Excellent (80%+): {excellent}{Colors.RESET}")
|
|
146
|
+
print(f" {Colors.YELLOW}Good (60-79%): {good}{Colors.RESET}")
|
|
147
|
+
print(f" {Colors.RED}Needs work (<60%): {needs_work}{Colors.RESET}")
|
|
148
|
+
print(f"\n Total: {len(results)} skills")
|
|
149
|
+
|
|
150
|
+
avg_score = sum(r.get("score", 0) for r in results) / len(results) if results else 0
|
|
151
|
+
color = Colors.GREEN if avg_score >= 80 else Colors.YELLOW if avg_score >= 60 else Colors.RED
|
|
152
|
+
print(f" {color}Average Quality Score: {avg_score:.1f}%{Colors.RESET}")
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def main():
|
|
156
|
+
# Find skills directory
|
|
157
|
+
cwd = Path.cwd()
|
|
158
|
+
skills_dir = cwd / ".agent" / "skills"
|
|
159
|
+
|
|
160
|
+
if not skills_dir.exists():
|
|
161
|
+
print(f"{Colors.RED}Error: .agent/skills not found{Colors.RESET}")
|
|
162
|
+
sys.exit(1)
|
|
163
|
+
|
|
164
|
+
checker = SkillChecker(skills_dir)
|
|
165
|
+
|
|
166
|
+
if len(sys.argv) > 1:
|
|
167
|
+
arg = sys.argv[1]
|
|
168
|
+
|
|
169
|
+
if arg == "--all":
|
|
170
|
+
results = checker.check_all()
|
|
171
|
+
for result in results:
|
|
172
|
+
if result.get("score", 0) < 80: # Only show non-excellent
|
|
173
|
+
checker.print_result(result)
|
|
174
|
+
checker.print_summary(results)
|
|
175
|
+
else:
|
|
176
|
+
result = checker.check_skill(arg)
|
|
177
|
+
checker.print_result(result)
|
|
178
|
+
else:
|
|
179
|
+
# Default: show summary only
|
|
180
|
+
results = checker.check_all()
|
|
181
|
+
checker.print_summary(results)
|
|
182
|
+
|
|
183
|
+
# Show top 5 needing improvement
|
|
184
|
+
needs_work = sorted([r for r in results if r.get("score", 0) < 80],
|
|
185
|
+
key=lambda x: x.get("score", 0))[:5]
|
|
186
|
+
|
|
187
|
+
if needs_work:
|
|
188
|
+
print(f"\n{Colors.YELLOW}Skills needing improvement:{Colors.RESET}")
|
|
189
|
+
for r in needs_work:
|
|
190
|
+
print(f" - {r['name']}: {r.get('score', 0):.0f}%")
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
if __name__ == "__main__":
|
|
194
|
+
main()
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# AGENTS.md - Backend API
|
|
2
|
+
|
|
3
|
+
> **[PROJECT_NAME]** - Production-ready backend API.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## ๐ Project Overview
|
|
8
|
+
|
|
9
|
+
[Brief description of your backend API]
|
|
10
|
+
|
|
11
|
+
### Tech Stack
|
|
12
|
+
|
|
13
|
+
| Layer | Technology | Version |
|
|
14
|
+
|-------|------------|---------|
|
|
15
|
+
| **Runtime** | Node.js | 20.x LTS |
|
|
16
|
+
| **Framework** | Express / Fastify / NestJS | - |
|
|
17
|
+
| **Language** | TypeScript | 5.x |
|
|
18
|
+
| **Database** | PostgreSQL + Prisma | - |
|
|
19
|
+
| **Cache** | Redis | 7.x |
|
|
20
|
+
| **Auth** | JWT + bcrypt | - |
|
|
21
|
+
| **Docs** | Swagger / OpenAPI | 3.1 |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## ๐ ๏ธ Setup Commands
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Install dependencies
|
|
29
|
+
npm install
|
|
30
|
+
|
|
31
|
+
# Setup database
|
|
32
|
+
npx prisma generate
|
|
33
|
+
npx prisma migrate dev
|
|
34
|
+
|
|
35
|
+
# Seed database
|
|
36
|
+
npm run db:seed
|
|
37
|
+
|
|
38
|
+
# Start development server
|
|
39
|
+
npm run dev
|
|
40
|
+
|
|
41
|
+
# Build for production
|
|
42
|
+
npm run build
|
|
43
|
+
|
|
44
|
+
# Start production server
|
|
45
|
+
npm start
|
|
46
|
+
|
|
47
|
+
# Run tests
|
|
48
|
+
npm test
|
|
49
|
+
|
|
50
|
+
# Lint code
|
|
51
|
+
npm run lint
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## ๐ Code Style & Standards
|
|
57
|
+
|
|
58
|
+
### TypeScript
|
|
59
|
+
- Strict mode enabled
|
|
60
|
+
- Proper typing for all functions
|
|
61
|
+
- DTOs for request/response validation
|
|
62
|
+
|
|
63
|
+
### API Patterns
|
|
64
|
+
- RESTful conventions
|
|
65
|
+
- Consistent error handling
|
|
66
|
+
- Request validation with Zod/Joi
|
|
67
|
+
- Response serialization
|
|
68
|
+
|
|
69
|
+
### File Naming
|
|
70
|
+
- Controllers: `resource.controller.ts`
|
|
71
|
+
- Services: `resource.service.ts`
|
|
72
|
+
- Routes: `resource.routes.ts`
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## ๐ Project Structure
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
src/
|
|
80
|
+
โโโ controllers/ # Request handlers
|
|
81
|
+
โโโ services/ # Business logic
|
|
82
|
+
โโโ routes/ # API routes
|
|
83
|
+
โโโ middleware/
|
|
84
|
+
โ โโโ auth.ts # Authentication
|
|
85
|
+
โ โโโ validation.ts # Request validation
|
|
86
|
+
โ โโโ error-handler.ts # Error handling
|
|
87
|
+
โโโ models/ # Database models
|
|
88
|
+
โโโ types/ # TypeScript types
|
|
89
|
+
โโโ utils/ # Utility functions
|
|
90
|
+
โโโ config/ # Configuration
|
|
91
|
+
โโโ index.ts # Entry point
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## ๐ API Endpoints
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
GET /api/v1/resources # List resources
|
|
100
|
+
POST /api/v1/resources # Create resource
|
|
101
|
+
GET /api/v1/resources/:id # Get single resource
|
|
102
|
+
PUT /api/v1/resources/:id # Update resource
|
|
103
|
+
DELETE /api/v1/resources/:id # Delete resource
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
API Documentation: `http://localhost:3000/api/docs`
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## ๐ Security Guidelines
|
|
111
|
+
|
|
112
|
+
### Environment Variables
|
|
113
|
+
```bash
|
|
114
|
+
# Required (never commit these)
|
|
115
|
+
DATABASE_URL=
|
|
116
|
+
JWT_SECRET=
|
|
117
|
+
REDIS_URL=
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Best Practices
|
|
121
|
+
- Input validation on all endpoints
|
|
122
|
+
- Rate limiting on sensitive routes
|
|
123
|
+
- CORS configuration
|
|
124
|
+
- Helmet for security headers
|
|
125
|
+
- SQL injection prevention (use Prisma/ORM)
|
|
126
|
+
- Password hashing with bcrypt
|
|
127
|
+
- JWT token expiration
|
|
128
|
+
|
|
129
|
+
### Authentication Flow
|
|
130
|
+
```
|
|
131
|
+
POST /api/v1/auth/register
|
|
132
|
+
POST /api/v1/auth/login
|
|
133
|
+
POST /api/v1/auth/refresh
|
|
134
|
+
POST /api/v1/auth/logout
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## ๐งช Testing
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Unit tests
|
|
143
|
+
npm test
|
|
144
|
+
|
|
145
|
+
# Integration tests
|
|
146
|
+
npm run test:integration
|
|
147
|
+
|
|
148
|
+
# Coverage report
|
|
149
|
+
npm run test:coverage
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Test Structure
|
|
153
|
+
```
|
|
154
|
+
__tests__/
|
|
155
|
+
โโโ unit/
|
|
156
|
+
โ โโโ services/
|
|
157
|
+
โ โโโ utils/
|
|
158
|
+
โโโ integration/
|
|
159
|
+
โ โโโ api/
|
|
160
|
+
โโโ fixtures/
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## ๐ Database
|
|
166
|
+
|
|
167
|
+
### Prisma Commands
|
|
168
|
+
```bash
|
|
169
|
+
# Generate client
|
|
170
|
+
npx prisma generate
|
|
171
|
+
|
|
172
|
+
# Create migration
|
|
173
|
+
npx prisma migrate dev --name migration_name
|
|
174
|
+
|
|
175
|
+
# Reset database
|
|
176
|
+
npx prisma migrate reset
|
|
177
|
+
|
|
178
|
+
# Open Prisma Studio
|
|
179
|
+
npx prisma studio
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## ๐ Deployment
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Build
|
|
188
|
+
npm run build
|
|
189
|
+
|
|
190
|
+
# Start production
|
|
191
|
+
NODE_ENV=production npm start
|
|
192
|
+
|
|
193
|
+
# With PM2
|
|
194
|
+
pm2 start ecosystem.config.js
|
|
195
|
+
|
|
196
|
+
# Docker
|
|
197
|
+
docker-compose up -d
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## ๐ค AI Agent Configuration
|
|
203
|
+
|
|
204
|
+
### Quick Commands
|
|
205
|
+
|
|
206
|
+
| Command | Description |
|
|
207
|
+
|---------|-------------|
|
|
208
|
+
| `/create user CRUD` | Create CRUD endpoints |
|
|
209
|
+
| `/debug 500 error` | Debug server errors |
|
|
210
|
+
| `/test UserService` | Generate tests |
|
|
211
|
+
| `/plan microservice` | Plan architecture |
|
|
212
|
+
|
|
213
|
+
### Agent Mentions
|
|
214
|
+
|
|
215
|
+
- `@backend-specialist` - API development
|
|
216
|
+
- `@database-architect` - Schema design
|
|
217
|
+
- `@security-auditor` - Security review
|
|
218
|
+
- `@devops-engineer` - Deployment
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## ๐ Additional Resources
|
|
223
|
+
|
|
224
|
+
- [Express.js](https://expressjs.com)
|
|
225
|
+
- [Prisma Documentation](https://www.prisma.io/docs)
|
|
226
|
+
- [JWT Best Practices](https://jwt.io/introduction)
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
*Built with Agent Kit - AI-enhanced backend development*
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
> **Project using Agent Kit** - AI-enhanced development configuration.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## ๐ Project Overview
|
|
8
|
+
|
|
9
|
+
<!-- Replace with your project description -->
|
|
10
|
+
[PROJECT_NAME] - [Brief description of what this project does]
|
|
11
|
+
|
|
12
|
+
### Tech Stack
|
|
13
|
+
<!-- Update based on your project -->
|
|
14
|
+
| Layer | Technology |
|
|
15
|
+
|-------|------------|
|
|
16
|
+
| **Frontend** | Next.js / React |
|
|
17
|
+
| **Backend** | Node.js / Express |
|
|
18
|
+
| **Database** | PostgreSQL / MongoDB |
|
|
19
|
+
| **Styling** | Tailwind CSS |
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## ๐ ๏ธ Setup Commands
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Install dependencies
|
|
27
|
+
npm install
|
|
28
|
+
|
|
29
|
+
# Start development server
|
|
30
|
+
npm run dev
|
|
31
|
+
|
|
32
|
+
# Run tests
|
|
33
|
+
npm test
|
|
34
|
+
|
|
35
|
+
# Build for production
|
|
36
|
+
npm run build
|
|
37
|
+
|
|
38
|
+
# Lint code
|
|
39
|
+
npm run lint
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## ๐ Code Style
|
|
45
|
+
|
|
46
|
+
- **TypeScript** strict mode enabled
|
|
47
|
+
- **Functional components** with hooks
|
|
48
|
+
- **Tailwind CSS** for styling
|
|
49
|
+
- **Absolute imports** with `@/` alias
|
|
50
|
+
- External links: always add `rel="noopener noreferrer"`
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## ๐ Project Structure
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
src/
|
|
58
|
+
โโโ app/ # Next.js App Router
|
|
59
|
+
โโโ components/ # React components
|
|
60
|
+
โโโ lib/ # Utilities
|
|
61
|
+
โโโ hooks/ # Custom hooks
|
|
62
|
+
โโโ types/ # TypeScript types
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## ๐งช Testing
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Unit tests
|
|
71
|
+
npm test
|
|
72
|
+
|
|
73
|
+
# E2E tests
|
|
74
|
+
npm run test:e2e
|
|
75
|
+
|
|
76
|
+
# Coverage report
|
|
77
|
+
npm run test:coverage
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## ๐ Security
|
|
83
|
+
|
|
84
|
+
- No hardcoded API keys or secrets
|
|
85
|
+
- Environment variables for configuration
|
|
86
|
+
- Follow OWASP security guidelines
|
|
87
|
+
- Input validation on all forms
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## ๐ค AI Agent Configuration
|
|
92
|
+
|
|
93
|
+
This project uses [Agent Kit](https://github.com/musashishao/agent-kit) for AI-enhanced development.
|
|
94
|
+
|
|
95
|
+
### Available Slash Commands
|
|
96
|
+
| Command | Purpose |
|
|
97
|
+
|---------|---------|
|
|
98
|
+
| `/create` | Create new features |
|
|
99
|
+
| `/debug` | Debug issues |
|
|
100
|
+
| `/test` | Generate tests |
|
|
101
|
+
| `/deploy` | Deploy to production |
|
|
102
|
+
| `/ui-ux-pro-max` | Design premium UI |
|
|
103
|
+
|
|
104
|
+
### Available Agents
|
|
105
|
+
Mention agents with `@agent-name`:
|
|
106
|
+
- `@frontend-specialist` - UI development
|
|
107
|
+
- `@backend-specialist` - API/server
|
|
108
|
+
- `@debugger` - Bug fixing
|
|
109
|
+
- `@security-auditor` - Security review
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## ๐ Documentation
|
|
114
|
+
|
|
115
|
+
- README.md - Getting started
|
|
116
|
+
- docs/ - Detailed documentation
|
|
117
|
+
- .agent/ - AI agent configuration
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
*Powered by Agent Kit*
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# AGENTS.md - Mobile Application
|
|
2
|
+
|
|
3
|
+
> **[PROJECT_NAME]** - Cross-platform mobile application.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## ๐ Project Overview
|
|
8
|
+
|
|
9
|
+
[Brief description of your mobile application]
|
|
10
|
+
|
|
11
|
+
### Tech Stack
|
|
12
|
+
|
|
13
|
+
| Layer | Technology | Version |
|
|
14
|
+
|-------|------------|---------|
|
|
15
|
+
| **Framework** | React Native | 0.76.x |
|
|
16
|
+
| **Navigation** | React Navigation | 7.x |
|
|
17
|
+
| **State** | Zustand / TanStack Query | - |
|
|
18
|
+
| **Styling** | NativeWind (Tailwind) | 4.x |
|
|
19
|
+
| **Build** | Expo | 52.x |
|
|
20
|
+
| **Backend** | Firebase / Supabase | - |
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## ๐ ๏ธ Setup Commands
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Install dependencies
|
|
28
|
+
npm install
|
|
29
|
+
|
|
30
|
+
# Start Expo development server
|
|
31
|
+
npm start
|
|
32
|
+
|
|
33
|
+
# Run on iOS simulator
|
|
34
|
+
npm run ios
|
|
35
|
+
|
|
36
|
+
# Run on Android emulator
|
|
37
|
+
npm run android
|
|
38
|
+
|
|
39
|
+
# Run tests
|
|
40
|
+
npm test
|
|
41
|
+
|
|
42
|
+
# Lint code
|
|
43
|
+
npm run lint
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## ๐ Code Style & Standards
|
|
49
|
+
|
|
50
|
+
### TypeScript
|
|
51
|
+
- Strict mode enabled
|
|
52
|
+
- Proper typing for all props
|
|
53
|
+
- No `any` types
|
|
54
|
+
|
|
55
|
+
### React Native Patterns
|
|
56
|
+
- Functional components with hooks
|
|
57
|
+
- Memoization for performance
|
|
58
|
+
- Platform-specific files when needed (`.ios.tsx`, `.android.tsx`)
|
|
59
|
+
|
|
60
|
+
### File Naming
|
|
61
|
+
- Screens: `ScreenName.tsx` โ `HomeScreen.tsx`
|
|
62
|
+
- Components: `ComponentName.tsx` โ `Button.tsx`
|
|
63
|
+
- Hooks: `useHookName.ts` โ `useAuth.ts`
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## ๐ Project Structure
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
src/
|
|
71
|
+
โโโ app/ # Expo Router screens
|
|
72
|
+
โ โโโ (tabs)/ # Tab navigation
|
|
73
|
+
โ โโโ (auth)/ # Auth screens
|
|
74
|
+
โ โโโ _layout.tsx # Root layout
|
|
75
|
+
โ
|
|
76
|
+
โโโ components/
|
|
77
|
+
โ โโโ ui/ # Reusable UI components
|
|
78
|
+
โ โโโ forms/ # Form components
|
|
79
|
+
โ โโโ layout/ # Layout components
|
|
80
|
+
โ
|
|
81
|
+
โโโ lib/
|
|
82
|
+
โ โโโ api.ts # API client
|
|
83
|
+
โ โโโ utils.ts # Utility functions
|
|
84
|
+
โ
|
|
85
|
+
โโโ hooks/ # Custom hooks
|
|
86
|
+
โโโ stores/ # Zustand stores
|
|
87
|
+
โโโ types/ # TypeScript types
|
|
88
|
+
โโโ constants/ # App constants
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## ๐ Security Guidelines
|
|
94
|
+
|
|
95
|
+
### Environment Variables
|
|
96
|
+
```bash
|
|
97
|
+
# Use expo-constants or react-native-dotenv
|
|
98
|
+
EXPO_PUBLIC_API_URL=
|
|
99
|
+
EXPO_PUBLIC_FIREBASE_API_KEY=
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Best Practices
|
|
103
|
+
- Never store sensitive data in AsyncStorage unencrypted
|
|
104
|
+
- Use Keychain (iOS) / Keystore (Android) for tokens
|
|
105
|
+
- Validate all API responses
|
|
106
|
+
- Implement certificate pinning for production
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## ๐งช Testing
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Unit tests with Jest
|
|
114
|
+
npm test
|
|
115
|
+
|
|
116
|
+
# E2E tests with Detox
|
|
117
|
+
npm run test:e2e
|
|
118
|
+
|
|
119
|
+
# Coverage report
|
|
120
|
+
npm run test:coverage
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## ๐ฑ Platform Specifics
|
|
126
|
+
|
|
127
|
+
### iOS
|
|
128
|
+
- Minimum iOS version: 15.1
|
|
129
|
+
- Required permissions in `app.json`
|
|
130
|
+
- Submit via App Store Connect
|
|
131
|
+
|
|
132
|
+
### Android
|
|
133
|
+
- Minimum SDK: 24 (Android 7.0)
|
|
134
|
+
- Required permissions in `app.json`
|
|
135
|
+
- Submit via Google Play Console
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## ๐ Deployment
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Build for iOS
|
|
143
|
+
eas build --platform ios
|
|
144
|
+
|
|
145
|
+
# Build for Android
|
|
146
|
+
eas build --platform android
|
|
147
|
+
|
|
148
|
+
# Submit to stores
|
|
149
|
+
eas submit
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## ๐ค AI Agent Configuration
|
|
155
|
+
|
|
156
|
+
### Quick Commands
|
|
157
|
+
|
|
158
|
+
| Command | Description |
|
|
159
|
+
|---------|-------------|
|
|
160
|
+
| `/create login screen` | Create auth screens |
|
|
161
|
+
| `/debug navigation crash` | Debug navigation issues |
|
|
162
|
+
| `/test ProfileScreen` | Generate tests |
|
|
163
|
+
| `/ui-ux-pro-max bottom sheet` | Design mobile UI |
|
|
164
|
+
|
|
165
|
+
### Agent Mentions
|
|
166
|
+
|
|
167
|
+
- `@mobile-developer` - React Native / Flutter
|
|
168
|
+
- `@frontend-specialist` - Component design
|
|
169
|
+
- `@backend-specialist` - API integration
|
|
170
|
+
- `@test-engineer` - Test generation
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## ๐ Additional Resources
|
|
175
|
+
|
|
176
|
+
- [React Native Documentation](https://reactnative.dev)
|
|
177
|
+
- [Expo Documentation](https://docs.expo.dev)
|
|
178
|
+
- [React Navigation](https://reactnavigation.org)
|
|
179
|
+
- [NativeWind](https://www.nativewind.dev)
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
*Built with Agent Kit - AI-enhanced mobile development*
|