mit einem Klick
consult-auto
// Consult Gemini and Codex for high-level planning, synthesize into a detailed plan, implement, then get final review. No user interaction.
// Consult Gemini and Codex for high-level planning, synthesize into a detailed plan, implement, then get final review. No user interaction.
Autonomously create a plan, consult Gemini and Codex for improvements, apply feedback, and implement. No user interaction - uses best judgment throughout.
Turn an idea into a concrete design through structured dialogue.
Gemini and Codex collaboratively brainstorm solutions, building on each other's ideas across rounds. Agent synthesizes the best ideas into a plan.
Claude brainstorms with an opponent LLM (Gemini or Codex) in alternating turns, building on each other's ideas. Synthesizes the best ideas into a plan.
Commit the staged changes. If there are no staged changes, stage all changes first.
Consult an external LLM with the user's query.
| name | consult-auto |
| description | Consult Gemini and Codex for high-level planning, synthesize into a detailed plan, implement, then get final review. No user interaction. |
Consult external LLMs for planning ideas, synthesize into a detailed plan, implement, and review.
Arguments: $ARGUMENTS
Check the arguments for flags:
Reviewer flags (mutually exclusive):
--gemini → use only Gemini--codex → use only Codex--claude → use a Claude subagent (Task tool)Mode flags:
--dry-run → plan only, skip implementation and final review (stop after Phase 3/3.5)--skip-final → skip the final review phase (Phase 5)--rounds N → after synthesizing the plan, run N-1 additional review-refine cycles (default: 1). Max: 3.--skip-explore → skip Phase 1 codebase exploration, go straight to Phase 2 with only the task description and any explicitly mentioned filesStrip all flags from arguments to get the task description.
If --skip-explore: Skip the exploration step. Use only the task description and any files the user has explicitly mentioned. Proceed directly to Phase 2 with a minimal context summary.
Explore the codebase - use Glob, Grep, Read to understand:
Make reasonable assumptions - do NOT ask clarifying questions
Prepare context summary - create a brief summary of:
Based on the reviewer flag from arguments, consult external LLMs for high-level planning ideas.
Planning prompt (include your context summary and relevant file contents):
I need to implement the following task:
[Task description]
Here's what I found in the codebase:
[Context summary - relevant files, patterns, conventions]
Provide a high-level implementation plan:
- What approach would you recommend?
- What files need to be created or modified?
- What are the key implementation steps?
- Any edge cases or concerns to address?
- Any architectural decisions to consider?
Be specific about file paths and implementation details. Focus on the approach, not boilerplate.
--gemini: Gemini onlyCall mcp__consult-llm__consult_llm with:
model: "gemini"prompt: Planning prompt abovefiles: Array of relevant source files discovered in Phase 1--codex: Codex onlyCall mcp__consult-llm__consult_llm with:
model: "openai"prompt: Planning prompt abovefiles: Array of relevant source files discovered in Phase 1--claude: Claude subagentUse the Task tool with subagent_type: "general-purpose" and a prompt like:
I need a high-level implementation plan for: [task description]
Explore the codebase and provide:
- Recommended approach
- Files to create or modify
- Key implementation steps
- Edge cases and concerns
- Architectural decisions
Be specific about file paths. Focus on the approach, not boilerplate.
Spawn BOTH as parallel subagents (Agent tool, subagent_type: "general-purpose", model: "sonnet"). NEVER run subagents in the background — always run them in the foreground so you can process their results immediately. Each subagent prompt must include the full planning prompt and file list so it can make the MCP call independently.
Gemini subagent — prompt must include:
mcp__consult-llm__consult_llm with model: "gemini", prompt: the planning prompt, files: [array of relevant source files][thread_id:xxx] prefixCodex subagent — prompt must include:
mcp__consult-llm__consult_llm with model: "openai", prompt: the planning prompt, files: [array of relevant source files][thread_id:xxx] prefixthread_idAfter each MCP call, check the response for a [thread_id:xxx] prefix. Extract and store the thread ID per model (e.g., gemini_thread_id, codex_thread_id). Pass the corresponding thread_id in all subsequent calls to the same model (Phase 3.5 rounds, Phase 5) so the reviewer retains full context from the planning phase without resending all files.
After receiving planning ideas from the LLM(s):
Compare approaches - if using both LLMs:
Synthesize the best approach using your judgment:
Write the detailed plan following this structure:
# [Feature Name] Implementation Plan
**Goal:** [One sentence describing what this builds]
**Approach:** [2-3 sentences about the synthesized approach]
**Sources:**
- Gemini suggested: [key idea taken]
- Codex suggested: [key idea taken]
- Agent decision: [any conflicts resolved]
**Assumptions:** [List any assumptions made without asking the user]
---
### Task 1: [Short description]
**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py` (lines 123-145)
**Steps:**
1. [Specific action]
2. [Specific action]
**Code:**
```language
// Include actual code, not placeholders
```
---
Guidelines:
Save the plan to history/<date>-plan-<feature-name>.md (e.g. history/2026-02-15-plan-user-auth.md).
--rounds N where N > 1)If --rounds N is specified and N > 1, run N-1 additional review-refine cycles on the synthesized plan.
For each additional round:
Send plan for review using the same reviewer(s) with this prompt, passing the thread_id from the previous call. The reviewer already has context from the planning phase, so you don't need to resend files — just include the updated plan file:
This is revision [N] of the implementation plan. Review the plan:
- Are the tasks correctly ordered and sized?
- Any missing steps or edge cases?
- Are the file paths and code snippets accurate?
- Any architectural concerns?
- Is this ready for implementation?
Focus on issues worth fixing. Be concise.
Apply improvements - synthesize feedback and update the plan:
Track changes - add a "Revision History" section to the plan noting what changed each round
Stop early if reviewers indicate no further changes needed
Update thread_id after each round — use the latest thread_id from the response
After completing all rounds (or stopping early), proceed to Phase 4.
If --dry-run: Skip to Phase 6 (Summary) - report the plan without implementing.
Implement the plan without further interaction:
Implementation rules:
If --skip-final: Skip to Phase 6 (Summary).
After implementation is complete, get a final review using the same reviewer(s) from Phase 2.
Generate the diff - get the full diff of all changes made
Consult the reviewer(s) based on the flag:
--gemini: Gemini onlyCall mcp__consult-llm__consult_llm with:
model: "gemini"prompt: Final review prompt belowgit_diff: { "files": [list of changed files], "base_ref": "HEAD~N" } (where N is number of commits)thread_id: The gemini_thread_id from Phase 2/3.5 (reviewer already knows the plan)--codex: Codex onlyCall mcp__consult-llm__consult_llm with:
model: "openai"prompt: Final review prompt belowgit_diff: { "files": [list of changed files], "base_ref": "HEAD~N" }thread_id: The codex_thread_id from Phase 2/3.5--claude: Claude subagentUse the Task tool with subagent_type: "general-purpose" and instruct it to run git diff to see changes.
Spawn BOTH as parallel subagents (Agent tool, subagent_type: "general-purpose", model: "sonnet"). NEVER run subagents in the background — always run them in the foreground so you can process their results immediately. Each subagent prompt must include the full review prompt, git_diff details, and thread_id.
Gemini subagent — prompt must include:
mcp__consult-llm__consult_llm with model: "gemini", prompt: the final review prompt, git_diff: { "files": [list of changed files], "base_ref": "HEAD~N" }, thread_id: gemini_thread_id from Phase 2/3.5[thread_id:xxx] prefixCodex subagent — prompt must include:
mcp__consult-llm__consult_llm with model: "openai", prompt: the final review prompt, git_diff: { "files": [list of changed files], "base_ref": "HEAD~N" }, thread_id: codex_thread_id from Phase 2/3.5[thread_id:xxx] prefixFinal review prompt:
Review this implementation for bugs, issues, or improvements:
- Any obvious bugs or edge cases missed?
- Code quality issues (error handling, naming, structure)?
- Deviations from best practices?
- Security concerns?
Be concise. Only flag issues worth fixing.
Apply fixes automatically - if the review identifies real issues:
Skip minor style suggestions - don't refactor for style alone
Present a final summary to the user:
## Summary
**Implemented:** [One sentence describing what was built]
**Planning sources:**
- Gemini contributed: [key idea]
- Codex contributed: [key idea]
- Resolved conflicts: [if any]
**Post-implementation fixes:**
- [Fix applied after final review, if any]
**Commits:**
- `abc1234` - [commit message]
- `def5678` - [commit message]