Skip to content

/multi-execute

Execute a multi-model implementation plan while preserving Claude as the only filesystem writer.

From plugin
ecc
303k113 skills71 agents113 commands1 MCP
> /plugin marketplace add affaan-m/ECC
> /plugin install ecc@ecc

Command definition

multi-execute.md
description: Execute a multi-model implementation plan while preserving Claude as the only filesystem writer.

Execute - Multi-Model Collaborative Execution

Multi-model collaborative execution - Get prototype from plan → Claude refactors and implements → Multi-model audit and delivery.

> **Prerequisite:** Requires the external `ccg-workflow` runtime, which is **not** part of the base ECC install. Initialize it with `npx ccg-workflow` to provision `~/.claude/bin/codeagent-wrapper` and the `~/.claude/.ccg/prompts/*` role files this command depends on. Without that runtime, this command will not run correctly.

$ARGUMENTS

---

Core Protocols

  • **Language Protocol**: Use **English** when interacting with tools/models, communicate with user in their language
  • **Code Sovereignty**: External models have **zero filesystem write access**, all modifications by Claude
  • **Dirty Prototype Refactoring**: Treat Codex/Antigravity Unified Diff as "dirty prototype", must refactor to production-grade code
  • **Stop-Loss Mechanism**: Do not proceed to next phase until current phase output is validated
  • **Prerequisite**: Only execute after user explicitly replies "Y" to `/ccg:plan` output (if missing, must confirm first)

---

Multi-Model Call Specification

**Call Syntax** (parallel: use `run_in_background: true`):

# Resume session call (recommended) - Implementation Prototype
Bash({
  command: "~/.claude/bin/codeagent-wrapper --backend <codex|antigravity> 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 --backend <codex|antigravity> - \"$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 --backend <codex|antigravity> 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**:

  • No extra model flag is needed for `--backend antigravity` or `--backend codex`; `codeagent-wrapper` picks each backend's default model.

**Role Prompts**:

| Phase | Codex | Antigravity | |-------|-------|--------| | Implementation | `~/.claude/.ccg/prompts/codex/architect.md` | `~/.claude/.ccg/prompts/antigravity/frontend.md` | | Review | `~/.claude/.ccg/prompts/codex/reviewer.md` | `~/.claude/.ccg/prompts/antigravity/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**:

  • Must specify `timeout: 600000`, otherwise default 30 seconds will cause premature timeout
  • If still incomplete after 10 minutes, continue polling with `TaskOutput`, **NEVER kill the process**
  • If waiting is skipped due to timeout, **MUST call `AskUserQuestion` to ask user whether to continue waiting or kill task**

---

Execution Workflow

**Execute Task**: $ARGUMENTS

Phase 0: Read Plan

`[Mode: Prepare]`

1. **Identify Input Type**:

  • Plan file path (e.g., `.claude/plan/xxx.md`)
  • Direct task description

2. **Read Plan Content**:

  • If plan file path provided, read and parse
  • Extract: task type, implementation steps, key files, SESSION_ID

3. **Pre-Execution Confirmation**:

  • If input is "direct task description" or plan missing `SESSION_ID` / key files: confirm with user first
  • If cannot confirm user replied "Y" to plan: must confirm again before proceeding

4. **Task Type Routing**:

| Task Type | Detection | Route | |-----------|-----------|-------| | **Frontend** | Pages, components, UI, styles, layout | Antigravity | | **Backend** | API, interfaces, database, logic, algorithms | Codex | | **Fullstack** | Contains both frontend and backend | Codex ∥ Antigravity parallel |

---

Phase 1: Quick Context Retrieval

`[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**:

  • Extract target paths from plan's "Key Files" table
  • Build semantic query covering: entry files, dependency modules, related type definitions
  • If results insufficient, add 1-2 recursive retrievals

**If ace-tool MCP is NOT available**, use Claude Code built-in tools as fallback: 1. **Glob**: Find target files from plan's "Key Files" table (e.g., `Glob("src/components/**/*.tsx")`) 2. **Grep**: Search for key symbols, function names, type definitions across the codebase 3. **Read**: Read the discovered files to gather complete context 4. **Task (Explore agent)**: For broader exploration, use `Task` with `subagent_type: "Explore"`

**After Retri

Read more
@affaan-m
Ships withecc

Your agent can write code, but ECC gives it a coordinated engineering system and toolbox: it plans before it builds, verifies changes with tests, reviews its own work from a fresh context, remembers what matters, and turns repeated wins into reusable skills

303k200 skills71 agents1 MCP
Get the whole plugin, auto-invoked

Stars on GitHub

Momentum

stars in total
302.5k
Star history of affaan-m/ECC on GitHub, a chart by star-history.com

Other commands on ecc.

aside
Auto-invoked

aside

Command

Answer a quick side question without interrupting or losing context from the current task. Resume work automatically after…

@affaan-m@affaan-mInstall Command
astra-review
Auto-invoked

astra-review

Command

Send Claude-written code to GPT-6-Astra (ChatGPT, via Codex CLI) for an independent cross-provider review, then fix what it finds.

@affaan-m@affaan-mInstall Command
auto-update
Auto-invoked

auto-update

Command

Pull the latest ECC repo changes and reinstall the current managed targets.

@affaan-m@affaan-mInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command
audit-codebase

audit-codebase

Command

RTK Codebase Health Audit — 7 catégories scorées 0-10

rtk4d86k
@rtk-ai@rtk-aiInstall Command