test-repo/SPECIALIZED_AGENTS.md
Matt Bruce b1d3546f70 Document shared Supabase pattern for web-dev agent
Added to web-dev agent rules:
- Shared Supabase project (qnatchrjlpehiijwtreh) for all Vercel apps
- Table naming convention: <projectName>_tableName
- Copy .env.local from existing projects
- Shared auth across apps
- Migration scripts with prefixed table names

Updated SPECIALIZED_AGENTS.md documentation with pattern details
2026-02-21 19:50:59 -06:00

218 lines
4.9 KiB
Markdown

# Specialized Agent Profiles
Created: February 22, 2026
## Overview
Three specialized agent profiles have been configured for different types of tasks. Each agent has its own skills, system prompt, and best practices built-in.
## Available Agents
| Agent ID | Name | Emoji | Purpose |
|----------|------|-------|---------|
| `ios-dev` | iOS Developer | 📱 | iOS/Swift/SwiftUI development |
| `web-dev` | Web Developer | 🌐 | Next.js/React/TypeScript development |
| `research` | Research Assistant | 🔍 | Research, analysis, compilation |
---
## iOS Developer (`ios-dev`)
**Best for:** iOS app development, SwiftUI, Swift, Xcode projects
**Auto-loaded Skills:**
- ios-26-role
- swiftui-expert-skill
- swift-clean-architecture
- swift-model-design
- swiftui-mvvm
- ios-project-structure
**Default Patterns:**
- Modern Swift concurrency (async/await)
- SwiftUI preferred over UIKit
- MVVM with @Observable
- iOS 26+ target
- Proper error handling & accessibility
- Unit tests for business logic
**Usage:**
```bash
# Switch to iOS agent
openclaw agents switch ios-dev
# Or spawn subagent for iOS task
# (In code: sessions_spawn with agentId: "ios-dev")
```
---
## Web Developer (`web-dev`)
**Best for:** Next.js, React, TypeScript, web apps
**Auto-loaded Skills:**
- nextjs-expert
- frontend-design
- shadcn-ui
- ui-ux-pro-max
- firebase-basics
- firebase-auth-basics
- firebase-firestore-basics
**Default Patterns:**
- Next.js App Router
- TypeScript with strict typing
- Tailwind CSS for styling
- Responsive design
- Component composition
- Error boundaries & loading states
- Semantic HTML & accessibility
- **Supabase for backend/database (preferred)**
- **Shared Supabase pattern for all Vercel apps** (same project, prefixed tables)
- Supabase SSR auth patterns
- Server components for data fetching
- Proper RLS policies
- Service role key only in API routes
**Shared Supabase Pattern (IMPORTANT):**
All Vercel-deployed web apps share the same Supabase project (`qnatchrjlpehiijwtreh`):
- Copy `.env.local` from existing project (blog-backup or gantt-board)
- **Table naming:** MUST use `<projectName>_tableName` format
- Examples: `blog_messages`, `mission-control_tasks`, `heartbeat-status`
- This prevents table name collisions across apps
- Auth is shared (same users table across all apps)
**Usage:**
```bash
# Switch to web agent
openclaw agents switch web-dev
# Or spawn subagent for web task
# (In code: sessions_spawn with agentId: "web-dev")
```
---
## Research Assistant (`research`)
**Best for:** Research tasks, information gathering, documentation
**Auto-loaded Skills:**
- browser-automation
- session-logs
**Default Patterns:**
- Web search for current info
- Multiple source verification
- Proper citation with URLs
- Well-structured markdown output
- Attribution sections
- Effective summarization
**Usage:**
```bash
# Spawn subagent for research
# (In code: sessions_spawn with agentId: "research")
```
---
## How to Use
### 1. Interactive Mode
Switch which agent you're talking to:
```bash
openclaw agents switch ios-dev
openclaw agents switch web-dev
openclaw agents switch research
openclaw agents switch main # Back to default
```
### 2. Subagent Tasks
When spawning tasks, specify the right agent:
```json
{
"agentId": "ios-dev",
"task": "Build a SwiftUI todo app with..."
}
```
```json
{
"agentId": "web-dev",
"task": "Create a Next.js dashboard with..."
}
```
```json
{
"agentId": "research",
"task": "Research the latest React patterns..."
}
```
### 3. From Main Agent
When I'm (Max) handling your requests, I can spawn the right specialist:
**iOS Task:**
```
User: "Build me a habit tracker app"
→ I spawn ios-dev subagent
→ It follows iOS skills automatically
→ Returns properly architected SwiftUI code
```
**Web Task:**
```
User: "Create a landing page"
→ I spawn web-dev subagent
→ It follows Next.js patterns from skills
→ Returns properly structured React components
```
**Research Task:**
```
User: "Find OpenClaw best practices"
→ I spawn research subagent
→ It searches, compiles, cites sources
→ Returns markdown document with attributions
```
---
## Benefits
1. **Specialized Knowledge** - Each agent loads relevant skills automatically
2. **Consistent Patterns** - iOS agent doesn't use web patterns, and vice versa
3. **Better Results** - Domain-specific expertise in each area
4. **Parallel Work** - Can spawn multiple specialized agents simultaneously
---
## Configuration Files
Agent configs stored at:
- `~/.openclaw/agents/ios-dev/agent/agent.json`
- `~/.openclaw/agents/web-dev/agent/agent.json`
- `~/.openclaw/agents/research/agent/agent.json`
Main config: `~/.openclaw/openclaw.json`
---
## Future Agents
Potential additional agents to create:
- `devops` - Infrastructure, Docker, CI/CD
- `data` - Python, data analysis, ML
- `design` - UI/UX, Figma, design systems
- `docs` - Technical writing, documentation
Just create a new `~/.openclaw/agents/<name>/agent/agent.json` and register in `openclaw.json`.