mit einem Klick
auto
// Autonomously create a plan, consult Gemini and Codex for improvements, apply feedback, and implement. No user interaction - uses best judgment throughout.
// Autonomously create a plan, consult Gemini and Codex for improvements, apply feedback, and implement. No user interaction - uses best judgment throughout.
| name | auto |
| description | Autonomously create a plan, consult Gemini and Codex for improvements, apply feedback, and implement. No user interaction - uses best judgment throughout. |
Autonomously plan and implement a feature with external LLM review.
Arguments: $ARGUMENTS
Check the arguments for flags:
Reviewer flags (mutually exclusive):
--gemini → use only Gemini for reviews--codex → use only Codex for reviews--claude → use a Claude subagent (Task tool) for reviews--no-review → skip all review phases (3, 4, and 6)Mode flags:
--dry-run → plan only, skip implementation and final review (stop after Phase 4)--skip-final → skip the final review phase (Phase 6)--rounds N → repeat the review-refine cycle N times (default: 1). Max: 3.Strip all flags from arguments to get the task description.
Explore the codebase - use Glob, Grep, Read to understand:
Make reasonable assumptions - do NOT ask clarifying questions
Create a plan document following this structure:
# [Feature Name] Implementation Plan
**Goal:** [One sentence describing what this builds]
**Approach:** [2-3 sentences about the approach]
**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).
If --no-review: Skip to Phase 5 (Implementation).
Based on the reviewer flag from arguments:
--gemini: Gemini onlyCall mcp__consult-llm__consult_llm with:
model: "gemini"prompt: See review prompt belowfiles: Array including the plan file and relevant source files--codex: Codex onlyCall mcp__consult-llm__consult_llm with:
model: "openai"prompt: See review prompt belowfiles: Array including the plan file and relevant source files--claude: Claude subagentUse the Task tool with subagent_type: "general-purpose" and a prompt like:
Review this implementation plan. The plan is in: [plan file path]
Consider:
- Are the tasks correctly ordered and sized?
- Are there any missing steps or edge cases?
- Are the file paths and code snippets accurate?
- Any architectural concerns or better approaches?
- Is the approach consistent with the existing codebase patterns?
Read the plan file and relevant source files, then provide specific, actionable feedback. Be concise.
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 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 review prompt, files: [array including the plan file and relevant source files][thread_id:xxx] prefixCodex subagent — prompt must include:
mcp__consult-llm__consult_llm with model: "openai", prompt: the review prompt, files: [array including the plan file and relevant source files][thread_id:xxx] prefixReview prompt (for Gemini/Codex):
Review this implementation plan. Consider:
- Are the tasks correctly ordered and sized?
- Are there any missing steps or edge cases?
- Are the file paths and code snippets accurate?
- Any architectural concerns or better approaches?
- Is the approach consistent with the existing codebase patterns?
Provide specific, actionable feedback. Be concise.
thread_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 4 rounds, Phase 6) so the reviewer retains full context from earlier reviews without resending the plan and files.
After receiving feedback from both LLMs:
--rounds N)If --rounds N is specified and N > 1, repeat Phases 3-4 for additional rounds:
thread_id from the previous round. The reviewer already has context from prior rounds, so you don't need to resend files — just include the updated plan file:
This is revision [N] of the implementation plan. Review the updated plan:
- Were previous concerns addressed adequately?
- Any new issues introduced by the changes?
- Any remaining gaps or edge cases?
- Is the plan ready for implementation?
Focus on what changed. Be concise.
thread_id from the responseAfter completing all rounds (or stopping early), proceed to Phase 5.
If --dry-run: Skip to Phase 7 (Summary) - report the plan without implementing.
Implement the plan without further interaction:
Implementation rules:
If --no-review or --skip-final: Skip to Phase 7 (Summary).
After implementation is complete, review the changes using the same reviewer from Phase 3:
Generate the diff - get the full diff of all changes made
Consult the reviewer based on the flag:
--gemini or no flag: Use mcp__consult-llm__consult_llm with model: "gemini"--codex: Use mcp__consult-llm__consult_llm with model: "openai"--claude: Use Task tool with subagent_type: "general-purpose"Include git_diff (for mcp tool) or instruct the subagent to run git diff to see changes.
Pass the thread_id from Phase 3/4 so the reviewer has full context from the plan review. The reviewer already knows the plan — the diff shows how it was implemented.
Final 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]
**Plan improvements applied:**
- [Improvement from Gemini/Codex feedback]
- [Another improvement]
**Post-implementation fixes:**
- [Fix applied after final review, if any]
**Commits:**
- `abc1234` - [commit message]
- `def5678` - [commit message]
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 Gemini and Codex for high-level planning, synthesize into a detailed plan, implement, then get final review. No user interaction.
Consult an external LLM with the user's query.