Execute agents to work on a feature (generates and runs scripts)
Executes feature agents to work on planned features by generating and running background scripts.
/plugin marketplace add pubg-devops/workflow-adapter/plugin install workflow-adapter@devops-marketplace<feature_name> [max_iterations]Generate agent scripts and run them in background.
$1: Feature name (required). The feature folder must exist at doc/feature_{name}/.$2: Max iterations per agent (optional, default: 5). Each agent will run up to this many times before stopping.doc/feature_$1/ must exist with:
$1_spec.md$1_plan.mdIf feature doesn't exist, tell user to run /workflow-adapter:feature $1 first.
Check that doc/feature_$1/ folder exists and contains required files.
If not found, tell user to run /workflow-adapter:feature first.
Scan .claude/commands/ to find installed agents:
Read the script template from:
${CLAUDE_PLUGIN_ROOT}/scripts/run-agent.sh
Create scripts/ folder in project root if it doesn't exist.
Get max iterations from $2, default to 5 if not provided:
MAX_ITERATIONS=${2:-5}
For each agent, create scripts/run-{agent}.sh:
Replace in template:
{{AGENT_NAME}} → Capitalized agent name (e.g., "Alpha"){{AGENT_NAME_LOWER}} → Lowercase agent name (e.g., "alpha"){{MAX_ITERATIONS}} → Value from $2 or default 5Make the script executable: chmod +x scripts/run-{agent}.sh
Create scripts/run-orchestrator.sh with similar replacements.
Execute all agent scripts in background:
cd /path/to/project
# Run each agent in background, redirect output to log files
nohup ./scripts/run-alpha.sh $1 > logs/alpha.log 2>&1 &
echo "Alpha agent started (PID: $!)"
nohup ./scripts/run-beta.sh $1 > logs/beta.log 2>&1 &
echo "Beta agent started (PID: $!)"
nohup ./scripts/run-delta.sh $1 > logs/delta.log 2>&1 &
echo "Delta agent started (PID: $!)"
Create logs/ directory if it doesn't exist.
Output:
Feature agents executing: $1
Max iterations per agent: {max_iterations}
Scripts created:
- scripts/run-alpha.sh
- scripts/run-beta.sh
- scripts/run-delta.sh
- scripts/run-orchestrator.sh
Background processes started:
- Alpha agent (PID: XXXX) → logs/alpha.log (max {max_iterations} iterations)
- Beta agent (PID: XXXX) → logs/beta.log (max {max_iterations} iterations)
- Delta agent (PID: XXXX) → logs/delta.log (max {max_iterations} iterations)
Monitor commands:
- View logs: tail -f logs/alpha.log
- Check processes: ps aux | grep run-
- Stop all: /workflow-adapter:stop
Check progress:
- /workflow-adapter:validate $1
# Default: 5 iterations per agent
/workflow-adapter:execute sqs-redrive
# Custom: 10 iterations per agent
/workflow-adapter:execute sqs-redrive 10
# Quick test: 2 iterations
/workflow-adapter:execute sqs-redrive 2
nohup so they continue after terminal closeslogs/{agent}.logpkill -f "run-.*\.sh" to stop all agents