co-pilot-looplisted
Install: claude install-skill richfrem/agent-plugins-skills
# Cooperative Co-Pilot Loop (Supervisor Protocol)
The **Co-Pilot Loop** splits software engineering tasks between a **Supervisor (Outer Loop — you)** and an **Executor (Inner Loop — a lightweight companion sub-agent)**. The Supervisor acts as the product manager and QA director, while the Executor performs spec writing, planning, and coding inside an isolated worktree.
You do not know which CLI or chat interface the user is using — and that's fine. The skill is model-agnostic. It reads the cheapest model for the active CLI at runtime.
---
## 1. Setup & Orientation
### Step 1A — Determine the active CLI backend
Ask the user once (or detect from context):
> "Which CLI backend is available for the sub-agent? (`agy`, `claude`, `copilot`, `codex`, `llama`)"
### Step 1B — Look up the cheapest model for that backend
Consult `plugins/agent-orchestration/references/cheapest_models.json` (or `references/cheapest_models.md`) to select the cheapest model for the detected CLI backend.
### Step 1C — Spawn the sub-agent
Use `run_agent.py` with the resolved CLI and model:
```bash
# For agy (recommended — cheapest Gemini)
python ./scripts/run_agent.py <PERSONA_FILE> <PACKET_FILE> <OUTPUT_FILE> "<INSTRUCTION>" \
--cli agy --model "Gemini 3.5 Flash (Low)" < /dev/null
# For claude CLI
python ./scripts/run_agent.py <PERSONA_FILE> <PACKET_FILE> <OUTPUT_FILE> "<INSTRUCTION>" \
--cli claude --model claude-haiku-4.5 < /dev/null
# For copilot CLI
python ./scripts/run_agent.py <PERSONA_FIL