Triggers multi-model code workflow: prototypes via Codex/Gemini unified diffs, Claude refactors/applies to production code, then audits for issues/fixes. Requires prior plan confirmation.
From everything-claude-codenpx claudepluginhub memorialmkua-lab/aiclaude/multi-executeTriggers multi-model code workflow: prototypes via Codex/Gemini unified diffs, Claude refactors/applies to production code, then audits for issues/fixes. Requires prior plan confirmation.
/multi-executeOrchestrates multi-model code workflow: fetches prototype from plan, Claude refactors/implements via diffs, audits with external models, and delivers production code.
/multi-executeTriggers multi-model code workflow: prototypes via Codex/Gemini unified diffs, Claude refactors/applies to production code, then audits for issues/fixes. Requires prior plan confirmation.
/multi-execute[Requires codeagent-wrapper] Multi-model collaborative execution — prototype from plan → Claude refactors and implements → multi-model audit and delivery.
/multi-executeMulti-model collaborative execution — get prototype from plan, Claude refactors and implements, multi-model audit
/multi-executeMulti-model collaborative execution from plan to implementation with audit and delivery
Multi-model collaborative execution - Get prototype from plan → Claude refactors and implements → Multi-model audit and delivery.
$ARGUMENTS
/ccg:plan output (if missing, must confirm first)Call Syntax (parallel: use run_in_background: true):
# Resume session call (recommended) - Implementation Prototype
Bash({
command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--backend <codex|gemini> {{GEMINI_MODEL_FLAG}}resume <SESSION_ID> - \"$PWD\" <<'EOF'
ROLE_FILE: <role prompt path>
<TASK>
Requirement: <task description>
Context: <plan content + target files>
</TASK>
OUTPUT: Unified Diff Patch ONLY. Strictly prohibit any actual modifications.
EOF",
run_in_background: true,
timeout: 3600000,
description: "Brief description"
})
# New session call - Implementation Prototype
Bash({
command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--backend <codex|gemini> {{GEMINI_MODEL_FLAG}}- \"$PWD\" <<'EOF'
ROLE_FILE: <role prompt path>
<TASK>
Requirement: <task description>
Context: <plan content + target files>
</TASK>
OUTPUT: Unified Diff Patch ONLY. Strictly prohibit any actual modifications.
EOF",
run_in_background: true,
timeout: 3600000,
description: "Brief description"
})
Audit Call Syntax (Code Review / Audit):
Bash({
command: "~/.claude/bin/codeagent-wrapper {{LITE_MODE_FLAG}}--backend <codex|gemini> {{GEMINI_MODEL_FLAG}}resume <SESSION_ID> - \"$PWD\" <<'EOF'
ROLE_FILE: <role prompt path>
<TASK>
Scope: Audit the final code changes.
Inputs:
- The applied patch (git diff / final unified diff)
- The touched files (relevant excerpts if needed)
Constraints:
- Do NOT modify any files.
- Do NOT output tool commands that assume filesystem access.
</TASK>
OUTPUT:
1) A prioritized list of issues (severity, file, rationale)
2) Concrete fixes; if code changes are needed, include a Unified Diff Patch in a fenced code block.
EOF",
run_in_background: true,
timeout: 3600000,
description: "Brief description"
})
Model Parameter Notes:
{{GEMINI_MODEL_FLAG}}: When using --backend gemini, replace with --gemini-model gemini-3-pro-preview (note trailing space); use empty string for codexRole Prompts:
| Phase | Codex | Gemini |
|---|---|---|
| Implementation | ~/.claude/.ccg/prompts/codex/architect.md | ~/.claude/.ccg/prompts/gemini/frontend.md |
| Review | ~/.claude/.ccg/prompts/codex/reviewer.md | ~/.claude/.ccg/prompts/gemini/reviewer.md |
Session Reuse: If /ccg:plan provided SESSION_ID, use resume <SESSION_ID> to reuse context.
Wait for Background Tasks (max timeout 600000ms = 10 minutes):
TaskOutput({ task_id: "<task_id>", block: true, timeout: 600000 })
IMPORTANT:
timeout: 600000, otherwise default 30 seconds will cause premature timeoutTaskOutput, NEVER kill the processAskUserQuestion to ask user whether to continue waiting or kill taskExecute Task: $ARGUMENTS
[Mode: Prepare]
Identify Input Type:
.claude/plan/xxx.md)Read Plan Content:
Pre-Execution Confirmation:
SESSION_ID / key files: confirm with user firstTask Type Routing:
| Task Type | Detection | Route |
|---|---|---|
| Frontend | Pages, components, UI, styles, layout | Gemini |
| Backend | API, interfaces, database, logic, algorithms | Codex |
| Fullstack | Contains both frontend and backend | Codex ∥ Gemini parallel |
[Mode: Retrieval]
If ace-tool MCP is available, use it for quick context retrieval:
Based on "Key Files" list in plan, call mcp__ace-tool__search_context:
mcp__ace-tool__search_context({
query: "<semantic query based on plan content, including key files, modules, function names>",
project_root_path: "$PWD"
})
Retrieval Strategy:
If ace-tool MCP is NOT available, use Claude Code built-in tools as fallback:
Glob("src/components/**/*.tsx"))Task with subagent_type: "Explore"After Retrieval:
[Mode: Prototype]
Route Based on Task Type:
Limit: Context < 32k tokens
~/.claude/.ccg/prompts/gemini/frontend.md)Unified Diff Patch ONLY. Strictly prohibit any actual modifications.GEMINI_SESSION: prefer resume <GEMINI_SESSION>~/.claude/.ccg/prompts/codex/architect.md)Unified Diff Patch ONLY. Strictly prohibit any actual modifications.CODEX_SESSION: prefer resume <CODEX_SESSION>run_in_background: true):
TaskOutputSESSION_ID from plan for resume (create new session if missing)Follow the IMPORTANT instructions in Multi-Model Call Specification above
[Mode: Implement]
Claude as Code Sovereign executes the following steps:
Read Diff: Parse Unified Diff Patch returned by Codex/Gemini
Mental Sandbox:
Refactor and Clean:
Minimal Scope:
Apply Changes:
Self-Verification (strongly recommended):
[Mode: Audit]
After changes take effect, MUST immediately parallel call Codex and Gemini for Code Review:
Codex Review (run_in_background: true):
~/.claude/.ccg/prompts/codex/reviewer.mdGemini Review (run_in_background: true):
~/.claude/.ccg/prompts/gemini/reviewer.mdWait for both models' complete review results with TaskOutput. Prefer reusing Phase 3 sessions (resume <SESSION_ID>) for context consistency.
After audit passes, report to user:
## Execution Complete
### Change Summary
| File | Operation | Description |
|------|-----------|-------------|
| path/to/file.ts | Modified | Description |
### Audit Results
- Codex: <Passed/Found N issues>
- Gemini: <Passed/Found N issues>
### Recommendations
1. [ ] <Suggested test steps>
2. [ ] <Suggested verification steps>
# Execute plan file
/ccg:execute .claude/plan/feature-name.md
# Execute task directly (for plans already discussed in context)
/ccg:execute implement user authentication based on previous plan
/ccg:plan generates plan + SESSION_ID/ccg:execute reads plan, reuses SESSION_ID, executes implementation