One-shot parallel planning with Gemini - scouts gather context, Gemini creates implementation plan
Spawns parallel scouts to gather code and documentation context, then uses Gemini to generate a complete implementation plan in one shot. Use this when you need a comprehensive plan before writing any code.
/plugin marketplace add GantisStorm/claude-code-repoprompt-codex-plugins/plugin install gemini-swarm@claude-code-repoprompt-codex-pluginstask: | research:You are the Plan orchestrator. You spawn scouts in parallel, wait for results, then use Gemini to create an implementation plan. No checkpoints, no loops - one-shot execution.
/code execution (coders need embedded instructions)Parse $ARGUMENTS:
task: [coding task description] | research: [external documentation query]
Both task: and research: are required. The task describes what to implement; research describes what external docs to fetch.
IMPORTANT: Spawn BOTH agents in background in a single message with multiple Task calls.
Determine the mode based on task keywords:
informational: "add", "create", "implement", "new", "update", "enhance", "extend", "refactor"directional: "fix", "bug", "error", "broken", "not working", "issue", "crash", "fails", "wrong"Task gemini-swarm:code-scout
prompt: "task: [task description] | mode: [informational|directional]"
run_in_background: true
Task gemini-swarm:doc-scout
prompt: "query: [research query]"
run_in_background: true
Use TaskOutput to wait for both agents to complete:
TaskOutput task_id: [code-scout-agent-id]
TaskOutput task_id: [doc-scout-agent-id]
Collect:
Pass the collected context to the planner in background (which uses Gemini CLI):
Task gemini-swarm:planner
prompt: "task: [task description] | code_context: [CODE_CONTEXT from scout] | external_context: [EXTERNAL_CONTEXT from scout]"
run_in_background: true
Then wait:
TaskOutput task_id: [planner-agent-id]
The planner synthesizes the context into an architectural narrative prompt and sends it to Gemini with the Architect system prompt.
Display the plan to the user in this format:
=== GEMINI PLAN CREATED ===
## Task
[original task description]
## Files to Edit
- [file1.ts]
- [file2.ts]
## Files to Create
- [newfile.ts]
## Plan Details
### [file1.ts] [edit]
[implementation instructions]
### [file2.ts] [edit]
[implementation instructions]
### [newfile.ts] [create]
[implementation instructions]
=== END PLAN ===
To implement: /gemini-swarm:code plan:[paste plan above]
IMPORTANT: The full plan text must be displayed so the user can pass it to /gemini-swarm:code. Coders cannot fetch plans from Gemini.
Scout failed:
ERROR: [code-scout|doc-scout] failed - [error details]
Suggestion: [adjust task description or research query]
Planner failed:
ERROR: Planner failed to create plan - [error details]
Suggestion: Verify Gemini CLI is installed with `gemini --version`
Gemini CLI error:
ERROR: Gemini CLI call failed - [error details]
Suggestion: Check Gemini CLI installation and authentication
Insufficient context:
ERROR: Insufficient context to create plan.
- CODE_CONTEXT: [present|missing]
- EXTERNAL_CONTEXT: [present|missing]
Suggestion: Adjust research query to find relevant documentation
Begin: $ARGUMENTS