원클릭으로
massgen-run
// Launch a MassGen multi-agent run. Multiple LLM backends (codex, gemini, claude, grok) collaborate on a task via voting and consensus. Runs in Docker containers by default.
// Launch a MassGen multi-agent run. Multiple LLM backends (codex, gemini, claude, grok) collaborate on a task via voting and consensus. Runs in Docker containers by default.
| name | massgen-run |
| description | Launch a MassGen multi-agent run. Multiple LLM backends (codex, gemini, claude, grok) collaborate on a task via voting and consensus. Runs in Docker containers by default. |
| user-invocable | true |
| argument-hint | <query> --models codex/gpt-5.4 gemini/gemini-3-flash [--no-docker] [--max-duration N] |
| allowed-tools | ["Read","Write","Edit","Bash","Glob","Grep","Agent"] |
You are orchestrating a MassGen multi-agent run. Multiple LLM agents will collaborate on the user's task through answer generation, voting, and consensus.
Before doing anything else, verify the environment:
.massgen-quality/environment.json — check massgen.available and
note massgen.source ("uvx" or "local:/path") for Step 3 launch methodcd /path/to/massgen && uv sync
api_keys from .massgen-quality/environment.json — check which
providers are authenticated. The hook checks both environment variables AND
.env files (at $CWD/.env and $HOME/.env). If all keys show missing but the user
says keys exist, check for a .env file and suggest creating one:
# .env (at project root or $HOME)
OPENAI_API_KEY=sk-...
GOOGLE_API_KEY=AI...
ANTHROPIC_API_KEY=sk-ant-...
MassGen Docker configs already use env_file: .env for credential injection,
so a .env file ensures keys are available in containers too.openai, codex → openai keygemini → google keyclaude, claude_code → anthropic keygrok → xai key--no-docker)Docker is the default. Check:
docker from .massgen-quality/environment.json — check docker.available--no-docker, or ask user to start Dockerdocker.image_available — if false:
docker pull ghcr.io/massgen/mcp-runtime-sudo:latest
# or build locally:
cd /path/to/massgen && bash massgen/docker/build.sh --sudo
--no-docker: skip Docker config, use local execution modeParse from the user's input:
query: the task/question for agents--models: list of backend/model pairs (e.g., codex/gpt-5.4 gemini/gemini-3.1-pro-preview)--no-docker: disable Docker containerization--max-duration N: override orchestrator timeout (default: 1800s)If no --models specified, use defaults based on available API keys:
openai/gpt-5.4 gemini/gemini-3.1-pro-preview (default pair)openai/gpt-5.4gemini/gemini-3.1-pro-previewNote: coding agent backends (codex, claude_code) require Docker mode.
Default to openai and gemini backends which work without Docker.
Write config to .massgen-quality/sessions/<session_id>/configs/run_<timestamp>.yaml
(where <session_id> is run_<YYYYMMDD_HHMMSS>).
For each backend/model pair, create an agent entry. See
references/config-templates.md for the full template.
context_paths (critical): Lives under orchestrator:, not agents:. Each
entry is a {path, permission} dict. Agents can only see files in paths listed
here. If the task involves specific files or a project directory, you MUST
include the absolute path. Use read for reference material, write if agents
should modify files:
orchestrator:
context_paths:
- path: "/absolute/path/to/project"
permission: "read"
Key settings:
ui.display_type: "simple" (must be valid; --automation overrides to silent)ui.logging_enabled: trueIf Docker mode (not --no-docker), add per-agent:
enable_code_based_tools: trueexclude_file_operation_mcps: trueenable_mcp_command_line: truecommand_line_execution_mode: dockercommand_line_docker_image: ghcr.io/massgen/mcp-runtime-sudo:latestcommand_line_docker_credentials with env_file and API keysIf --no-docker (or Docker unavailable): use local CLI execution instead:
enable_mcp_command_line: truecommand_line_execution_mode: localMassGen runs take a while (often 5-30 minutes). Always use run_in_background: true
on the Bash tool — the hard 10-minute timeout will kill foreground runs.
Read plugin_dir from .massgen-quality/environment.json. Use the massgen
wrapper which handles API key sourcing and massgen resolution automatically:
bash "<plugin_dir>/scripts/run-massgen.sh" --automation \
--config "<config_path>" \
"<query>" 2>&1
Parse stderr output for automation status lines:
LOG_DIR: <path> — the session log directorySTATUS: <path> — path to status.json for monitoringLaunch sequence:
run_in_background: true on the Bash toolmassgen-monitor background agent with the PID and LOG_DIRFind status.json at <LOG_DIR>/turn_0/attempt_0/status.json (or latest turn/attempt).
Read and extract:
results.winner — the winning agent IDresults.votes — vote distributionagents.<id>.answer — each agent's answeragents.<id>.status — each agent's final statusmeta.elapsed_seconds — durationcosts.total_estimated_cost — cost estimatePresent to the user:
If the user wants to use the answer, offer to write it to a file or apply it.
status.json for
agents.<id>.error details.--max-duration or reduce agent count.--no-docker or starting Docker.Quick one-shot evaluation of work against quality criteria. Generates criteria, runs the round-evaluator, and presents the verdict. Lighter than /refine — does not auto-improve, just evaluates. Use for pre-PR quality checks or getting a critical assessment.
Run a MassGen-style quality refinement loop. Generates eval criteria, produces/improves answers with subagent help, regression-guards before submission, then evaluates with round-evaluator and trace-analyzer in parallel. Invoke with /refine.
Launch parallel MassGen step mode processes — the lead manages all background tasks directly, tracks answers/votes, detects consensus, and synthesizes the result.
Analyze media files (images, video, audio) using AI vision and audio models with a critical-first lens. Use for output-first verification — render your deliverable, then read_media to see what it actually looks like. Distinguishes fundamental issues from surface-level fixes.