Skip to content
Back to skills

Co Pilot Loop

ASecurity

Cooperative Multi-Agent Coordination Loop. Spawns a lightweight companion sub-agent to perform spec discovery, planning, and implementation while the primary agent acts as QA Director.

  • 7 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 2, 2026
ai-agentspythonbashgit

Works with

  • cli

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned October 3, 2026

npx -y skills add richfrem/agent-plugins-skills --skill co-pilot-loop --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Co Pilot Loop?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Co Pilot Loop
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-co-pilot-loop/badge)](https://www.skillsdirectory.com/skills/richfrem-co-pilot-loop)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: co-pilot-loop
plugin: agent-orchestration
description: "Cooperative Multi-Agent Coordination Loop. Spawns a lightweight companion sub-agent to perform spec discovery, planning, and implementation while the primary agent acts as QA Director."
allowed-tools: Bash, Read, Write
---

# Cooperative Co-Pilot Loop (`co-pilot-loop`)

Splits engineering tasks between a Supervisor (Outer Loop) and an Executor (Inner Loop sub-agent) running inside an isolated worktree.

## Contents

- [Constraints](#constraints)
- [Quick start](#quick-start)
- [Workflow](#workflow)
- [Verification](#verification)
- [References](#references)

## Constraints

- **No-Git rule**: The companion Executor is strictly forbidden from running any `git` commands.
- **Background protection**: Always append `< /dev/null` to CLI dispatch commands to prevent `SIGTTIN` hangs.
- **Sequential review gates**: Gate 1 (Spec), Gate 2 (Plan), Gate 3 (QA) must be completed in order.
- **Single commit rule**: All commits are made exclusively by the Supervisor after QA approval.

## Quick start

```bash
# Spawn companion sub-agent with strategy packet
python ./scripts/run_agent.py <PERSONA_FILE> <PACKET_FILE> <OUTPUT_FILE> "<INSTRUCTION>" \
  --cli agy --model "Gemini 3.5 Flash (Low)" < /dev/null
```

## Workflow

1. **Setup & Model**: Consult [cheapest_models.md](references/cheapest_models.md) or [cheapest_models.json](references/cheapest_models.json) to select companion model.
2. **Packet Handoff**: Create isolated worktree and assemble Strategy Packet specifying scope and no-git constraint.
3. **Gate 1 (Spec Review)**: Supervisor validates spec has zero placeholders (`TODO`/`TBD`) and ADR alignment.
4. **Gate 2 (Plan Review)**: Supervisor validates dependency ordering, rollback steps, and TDD contract.
5. **Gate 3 (Execution & QA)**: Executor implements in worktree; Supervisor audits `git diff` and runs test suite.
6. **Retrospective & Merge**: Merge validated changes from worktree and log session summary.

## Verification

```bash
# Verify supervisor gate acceptance criteria
pytest plugins/agent-orchestration/tests/test_loop_strategies.py
# Check git diff in companion worktree before merge
git -C <WORKTREE_PATH> diff --stat
```

## References

- [acceptance-criteria.md](references/acceptance-criteria.md) — Structural and behavioral expectations for co-pilot loop.
- [fallback-tree.md](references/fallback-tree.md) — Fallback escalation protocol for loop hangs and test failures.
- [cheapest_models.md](references/cheapest_models.md) — Companion sub-agent token and latency guide.
- [cheapest_models.json](references/cheapest_models.json) — Structured CLI model capability catalog.

Files in this skill

  • SKILL.md4.4 KB
  • evals/evals.json651 B
  • references/acceptance-criteria.md42 B
  • references/fallback-tree.md36 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…