# Agent Orchestration Hooks This directory contains dmux hooks that define how agents work in the OpenCode environment. ## Available Hooks - `worktree_created` - Triggered when a new worktree is created - `run_test` - For running tests - `run_dev` - For development tasks - `post_merge` - After merging changes ## Hook Usage Each hook should be executable and contain logic for the specific agent role: ```bash #!/bin/bash # Example hook for documentation agent # .dmux-hooks/worktree_created # Set environment for qwen3-coder export DMUX_AGENT="opencode" export QWEN_MODEL="qwen3-coder:30b" export AGENT_CONTEXT="homelab-documentation" # Run qwen3-coder documentation tasks echo "Initializing homelab documentation agent..." qwen3-coder --generate-docs \ --model "qwen3-coder:30b" \ --output "$DMUX_WORKTREE_PATH/docs/homelab.md" ``` ## Agent Roles - `documentation-agent.sh` - Generates documentation using qwen3-coder - `scripting-agent.sh` - Creates automation scripts - `deployment-agent.sh` - Manages deployments - `monitoring-agent.sh` - Tracks system performance