Customization Guide
Creating Your Own Triad
A triad consists of three components:
- A Claude strategy agent (
agents/claude/your-agent.md) - A Cursor bridge agent (
agents/cursor/your-agent-cursor.md) - Routing keywords in
etc/agent_pool_config.json
Step 1: Create the Claude Strategy Agent
Create agents/claude/your-agent.md:
---
name: your-agent
description: |
Design [domain] strategy, choose parameters, and review results.
Part of the your-agent triad (Claude strategy + Cursor implementation).
Trigger keywords: keyword1, keyword2, keyword3
model: opus
color: cyan
max_turns: 10
---
# Your Agent — Claude Strategy Agent
## Role
You are the **strategy** leg of the your-agent triad. You design
[domain-specific] approaches and provide specifications to the cursor
bridge agent for implementation.
## Domain Expertise
- [Expertise area 1]
- [Expertise area 2]
- [Expertise area 3]
## Output Format
```markdown
## Design for [Task]
### Strategy
1. [Step with parameters and rationale]
2. [Step with parameters and rationale]
### Specifications
[Detailed specs for Cursor to implement]
### Triad Dispatch
- **Cursor implementation**: [what to implement]
- **Cursor review**: [what to review]
Triad Pattern
- You design the approach, choose parameters, review results
- your-agent-cursor dispatches to Cursor CLI for implementation
- For full triad: you provide strategy, Codex implements, Composer reviews ```
Step 2: Create the Cursor Bridge Agent
Create agents/cursor/your-agent-cursor.md:
---
name: your-agent-cursor
description: |
CURSOR VALIDATION AGENT for [domain] implementation.
Dispatches to Cursor CLI for code generation and QC review.
Works with your-agent Claude agent for strategy.
model: haiku
color: orange
max_turns: 5
---
## CRITICAL: You Are a Cursor CLI Dispatcher — NOT an Implementer
You MUST use the Bash tool to invoke the real Cursor CLI for ALL work.
You are NOT allowed to generate code, fixes, or solutions yourself.
See: `agents/cursor/CURSOR_CLI_ENFORCEMENT.md`
### Step 1 — Codex Generates (MANDATORY Bash call)
```bash
$CLI_ROOT/bin/cursor-agent --model codex-standard "YOUR_SYNTHESIZED_PROMPT"
Step 2 — Composer Reviews (MANDATORY Bash call)
$CLI_ROOT/bin/cursor-agent --model composer-1.5 "Review: TASK. Output: CODEX_OUTPUT"
Rules
- NEVER do the work yourself
- ALWAYS call BOTH steps
- If CLI fails, report error — do NOT fall back
Your Agent Cursor Agent
Purpose
Dispatch [domain] tasks to Cursor CLI.
Dispatch Patterns
Pattern 1
$CLI_ROOT/bin/cursor-agent --model codex-standard "Implement [specific task]"
Pattern 2
$CLI_ROOT/bin/cursor-agent --model codex-high "Audit [specific concern]"
Self-Check Before Returning
- Called cursor-agent via Bash for Codex generation?
- Called cursor-agent via Bash for Composer review?
- Returning Composer-optimized output (not my own work)? ```
Step 3: Register the Triad
Add to etc/agent_pool_config.json:
{
"triads": {
"your-agent": {
"claude_agent": "agents/claude/your-agent.md",
"cursor_agent": "agents/cursor/your-agent-cursor.md",
"keywords": ["keyword1", "keyword2", "keyword3"]
}
}
}
Step 4: Add Routing Keywords
Add keywords to the routing.keyword_overrides section:
{
"routing": {
"keyword_overrides": {
"codex-standard": ["keyword1", "keyword2"],
"codex-high": ["keyword3"]
}
}
}
Adding a New Swarm Tier
1. Create the Tier Agent
Create agents/cursor/swarm/your-tier.md:
---
name: your-tier
description: |
[Tier description and purpose].
Routing: Activated for keywords: [keywords]
model: haiku
color: green
max_turns: 3
---
## You Are a CLI Dispatcher ONLY
### MANDATORY: Run This Bash Command Immediately
```bash
$CLI_ROOT/bin/cursor-dispatch.sh your-tier "PASTE_YOUR_TASK_PROMPT_HERE"
Rules
- Run the Bash command FIRST
- Do NOT read files, write code, or analyze anything
- Report errors, don’t fall back to self-implementation ```
2. Add to cursor-dispatch.sh
Edit bin/cursor-dispatch.sh to add the tier mapping:
case "${AGENT_NAME}" in
your-tier) MODEL="your-model-id" ;;
# ... existing tiers
esac
3. Register in Pool Config
Add to etc/agent_pool_config.json:
{
"swarm_tiers": {
"your-tier": {
"model": "your-model-id",
"description": "Purpose of this tier",
"max_concurrent": 2
}
}
}
Modifying Routing Keywords
The subagent-router script classifies tasks using keyword patterns. To customize:
Edit bin/subagent-router
Find the keyword variables and modify:
# Add your keywords to the appropriate category
CURSOR_KEYWORDS="fix|edit|rename|...|your-keyword"
CLAUDE_KEYWORDS="design|architect|...|your-keyword"
HIGH_TIER_KEYWORDS="security|audit|...|your-keyword"
Or Use the Config File
Add keyword overrides to etc/agent_pool_config.json:
{
"routing": {
"keyword_overrides": {
"codex-high": ["your-complex-keyword"],
"codex-standard": ["your-general-keyword"],
"composer-1.5": ["your-simple-keyword"]
}
}
}
Testing Your New Triad
# 1. Verify agent frontmatter
head -5 agents/claude/your-agent.md
head -5 agents/cursor/your-agent-cursor.md
# 2. Test routing
./bin/subagent-router --dry-run "keyword1 task description"
# 3. Test dispatch
./bin/cursor-dispatch.sh codex-standard "Simple test: return hello"
# 4. Full integration test
# Invoke the Claude agent in Claude Code and verify it triggers the bridge
| Home | Architecture | Triad Pattern | Customization | Cost Optimization |