| name | test-specialist-workflow |
| description | Test the full specialist handoff pipeline (review → test → merge) |
| triggers | ["test specialist workflow","test specialists","specialist e2e test","test approve pipeline"] |
| allowed-tools | ["Bash","Read","Grep","Glob"] |
Test Specialist Workflow
Test the full specialist handoff pipeline: review-agent -> test-agent -> merge-agent
When to Use
- After making changes to the specialist system
- To verify the approval pipeline works end-to-end
- As a smoke test for the dashboard approve functionality
What This Skill Does
- Creates a test GitHub issue
- Creates a workspace for the issue
- Makes a trivial change (adds timestamp to test fixture)
- Commits and pushes the change
- Triggers the approve workflow via dashboard API
- Monitors specialist activity to verify handoffs occur
- Verifies merge completes successfully
- Cleans up (closes issue, removes workspace)
Prerequisites
- Dashboard must be running (frontend on 3010, API on 3011)
- Specialists must be initialized (run
pan cloister start if not)
- GitHub CLI must be authenticated
Instructions
Step 1: Verify Prerequisites
curl -s http://localhost:3011/api/health | jq .
curl -s http://localhost:3011/api/specialists | jq '.[].name'
curl -s http://localhost:3011/api/specialists | jq 'length'
Step 2: Create Test Issue and Workspace
ISSUE_URL=$(gh issue create \
--title "Test: Specialist workflow $(date +%Y%m%d-%H%M%S)" \
--body "Automated test of specialist handoff pipeline. Will be auto-closed." \
2>&1)
ISSUE_NUM=$(echo "$ISSUE_URL" | grep -oP 'issues/\K\d+')
echo "Created issue: PAN-$ISSUE_NUM"
pan workspace create "PAN-$ISSUE_NUM"
WORKSPACE="~/Projects/overdeck/workspaces/feature-pan-$ISSUE_NUM"
cd "$WORKSPACE"
Step 3: Make Test Change
mkdir -p tests/fixtures
echo "Specialist workflow test at: $(date -Iseconds)" > tests/fixtures/specialist-test.txt
git add tests/fixtures/specialist-test.txt
git commit -m "test: specialist workflow test (PAN-$ISSUE_NUM)"
git push -u origin "feature/pan-$ISSUE_NUM"
Step 4: Trigger Approve Pipeline
RESULT=$(curl -s -X POST "http://localhost:3011/api/workspaces/PAN-$ISSUE_NUM/approve" \
-H "Content-Type: application/json")
echo "$RESULT" | jq .
Step 5: Monitor Specialist Activity
echo "=== REVIEW-AGENT ==="
tmux capture-pane -t specialist-review-agent -p | tail -20
sleep 30
echo "=== TEST-AGENT ==="
tmux capture-pane -t specialist-test-agent -p | tail -20
tmux send-keys -t specialist-test-agent Enter 2>/dev/null || true
sleep 60
echo "=== TEST-AGENT (after tests) ==="
tmux capture-pane -t specialist-test-agent -p | tail -20
echo "=== MERGE-AGENT ==="
tmux capture-pane -t specialist-merge-agent -p | tail -20
Step 6: Verify Merge Completed
cd ~/Projects/overdeck
git fetch origin
git log --oneline main -5 | grep -i "pan-$ISSUE_NUM" && echo "SUCCESS: Merge found!" || echo "PENDING: Merge not yet on main"
curl -s http://localhost:3011/api/specialists | jq '.[] | {name, state}'
Step 7: Cleanup
gh issue close "$ISSUE_NUM" -c "Automated test completed successfully"
rm -rf "$WORKSPACE"
echo "Cleanup complete!"
Troubleshooting
Specialists Not Responding
If specialists show "Exit code 1" errors or shell commands fail:
tmux kill-session -t specialist-review-agent 2>/dev/null
tmux kill-session -t specialist-test-agent 2>/dev/null
tmux kill-session -t specialist-merge-agent 2>/dev/null
pan specialists wake review-agent
pan specialists wake test-agent
pan specialists wake merge-agent
Handoff Not Occurring
If test-agent doesn't receive task from review-agent:
pan specialists wake test-agent --task "TEST TASK for PAN-$ISSUE_NUM:
WORKSPACE: $WORKSPACE
BRANCH: feature/pan-$ISSUE_NUM
PROJECT: ~/Projects/overdeck
1. cd $WORKSPACE
2. Run tests: npm test
3. If PASS: Hand off to merge-agent
4. If FAIL: Report failures"
Merge Blocked
If merge-agent can't complete:
cd ~/Projects/overdeck
git status
Expected Timeline
- Review-agent: 30-60 seconds
- Test-agent: 60-120 seconds (depends on test suite)
- Merge-agent: 30-60 seconds
- Total: 2-4 minutes
Success Criteria
- Review-agent completes review and hands off to test-agent
- Test-agent runs tests and hands off to merge-agent (if tests pass)
- Merge-agent merges branch to main and pushes
- Change appears in main branch
- All specialists return to idle state