Specialist Agents
Specialized AI agents that perform focused tasks in the development workflow.Overview
Specialist agents are permanent, long-lived agents that handle specific phases of the development lifecycle. Unlike work agents (which are temporary and tied to a single issue), specialists persist across multiple issues and build context over time. Key characteristics:- Persistent - Run continuously in tmux sessions
- Cross-issue - Work on multiple issues, building codebase knowledge
- Specialized - Each has a narrow, focused responsibility
- Coordinated - Managed by Cloister for handoffs
Types of Specialists
Panopticon includes three built-in specialists:| Specialist | Purpose | Trigger |
|---|---|---|
| review-agent | Code review before merge | Human clicks “Review” in dashboard |
| test-agent | Runs test suite after implementation | Automatically after review passes |
| merge-agent | Handles git merge and conflict resolution | Human clicks “Approve & Merge” |
Review Agent
The review-agent performs comprehensive code review, checking for:- Logic errors and edge cases
- Security vulnerabilities
- Performance issues
- Code quality and best practices
- PASSED - Code looks good, automatically queues test-agent
- BLOCKED - Issues found, sends feedback to work-agent with required fixes
- SKIPPED - Review not applicable or already completed
Test Agent
The test-agent runs the full test suite and analyzes failures. It’s automatically invoked after the review-agent passes. What it does:- Runs all configured test suites (backend, frontend, integration, e2e)
- Analyzes test failures to understand root causes
- Reports results with actionable feedback
- If tests pass, marks issue ready for merge
- PASSED - All tests pass, ready for human to approve merge
- FAILED - Tests failing, sends detailed feedback to work-agent
- SKIPPED - Tests not applicable or already run
~/.panopticon/projects.yaml:
Merge Agent
The merge-agent handles ALL merges, not just conflicts. This ensures:- It sees all code changes coming through the pipeline
- It builds context about the codebase over time
- When conflicts DO occur, it has better understanding for intelligent resolution
- Tests are always run before completing the merge
- Pull latest main - Ensures local main is up-to-date
- Analyze incoming changes - Reviews what the feature branch contains
- Perform merge - Merges feature branch into main
- Resolve conflicts - If conflicts exist, uses AI to resolve them intelligently
- Run tests - Verifies the merge didn’t break anything
- Commit merge - Commits the merge with descriptive message
- Report results - Returns success/failure with details
- Never force-push
- Always run tests before completing
- Document conflict resolution decisions
- Provide detailed feedback on what was merged
Review Pipeline Flow
The complete review pipeline is a sequential handoff between specialists:- Human-initiated start - A human must click “Review” to start the pipeline
- Automatic handoffs - review-agent → test-agent happens automatically
- Human approval for merge - Merge is NOT automatic; human clicks “Approve & Merge”
- Feedback loops - Failed reviews/tests send feedback back to the work-agent
Queue Processing
Each specialist has a task queue (~/.panopticon/specialists/{name}/hook.json) managed via the FPP (Fixed Point Principle):
urgent > high > normal > low
Completion triggers: When a specialist reports status (passed, failed, or skipped), the dashboard:
- Sets the specialist state to
idle - Checks the specialist’s queue for pending work
- If work exists, immediately wakes the specialist with the next task
Agent Self-Requeue (Circuit Breaker)
After a human initiates the first review, work-agents can request re-review up to 3 times automatically:- First human click resets the counter to 0
- Each
pan work request-reviewincrements the counter - After 3 automatic re-requests, returns HTTP 429
- Human must click “Review” in dashboard to continue
POST /api/workspaces/:issueId/request-review
Specialist Auto-Initialization
When Cloister starts, it automatically initializes specialists that don’t exist yet. This ensures the test-agent, review-agent, and merge-agent are ready to receive wake signals without manual setup. Manual initialization:Specialist Safeguards
All specialist agents are configured to:- Run in workspaces only - Never in the main project directory
- Never checkout branches - They work with the branch already in the workspace
- Create workspaces if needed - Use
pan workspace create <ISSUE-ID>instead ofgit checkout
- Prompt instructions - Clear warnings in all specialist prompts
- Code enforcement - Specialists spawn with workspace as cwd
- Git hooks - Auto-revert if checkout detected in tmux sessions
Configuration
Specialist configuration lives in~/.panopticon/cloister/config.json:
enabled- Whether the specialist is activeauto_wake- Whether to automatically wake on trigger (vs manual)model- Which AI model to use (haiku, sonnet, opus)
Viewing Specialist Status
Related Guides
- Cloister - AI lifecycle manager that coordinates specialists
- Convoys - Parallel specialist execution for code review
- Agent Commands - CLI commands for working with agents