Retrieved article excerpt
Open article · Retrieved 2026-11-07T02:26:59.725679+00:00
# [Code Copilot Team Logo](https://github.com/gosha70/code-copilot-team/blob/master/docs/images/CCT_LOGO.png) Code Copilot Team
An enforceable harness for AI-assisted coding: your rules, your workflow and your safety rails, applied the same way by every coding agent you use.
Built for **Claude Code** as the reference implementation, with the provider-neutral **Pi** enforced harness and portable conventions for Cursor, GitHub Copilot, Windsurf, Aider, and local LLMs.
[Latest release](https://github.com/gosha70/code-copilot-team/releases)
[CI](https://github.com/gosha70/code-copilot-team/actions/workflows/sync-check.yml)
[Pi tests](https://github.com/gosha70/code-copilot-team/actions/workflows/pi-tests.yml)
[Open in GitHub Codespaces](https://codespaces.new/gosha70/code-copilot-team)
[Code Copilot Team in 35 seconds: the installer, cct features, and two safety hooks refusing an edit to .env and a git push](https://github.com/gosha70/code-copilot-team/blob/master/docs/images/demo.gif)
Recorded on `master`: the `cct` command is not in the latest release yet. Every command shown is run by CI before the GIF is rendered — [`docs/demo/`](https://github.com/gosha70/code-copilot-team/blob/master/docs/demo/demo.tape).
> 📖 **Deep dive:** [Stop Fighting AI Agents and Build a Reusable Multi-Agent Dev Environment](https://www.linkedin.com/pulse/stop-fighting-ai-agents-build-reusable-multi-agent-dev-george-ivan-mxwbe) — the full story behind this project, lessons learned from 13+ real build sessions, and why every rule exists.
---
## What you get
- **Rules that hold.** Coding standards, safety constraints and conventions install once and load in every session, on every tool — enforced by hooks on Claude Code and Pi, read as rules everywhere else.
- **A workflow with gates.** Research → Plan → Build → Review, where a phase cannot complete until its verification passes and, if you want one, a second model has reviewed the diff.
- **A second opinion on demand.** Point at any provider — a hosted API, a model on your own GPU, or another CLI — and it reviews your work against a fixed verdict contract.
- **Unattended builds you can audit.** A driver builds an approved feature phase by phase outside the session, under spend and time caps, and leaves a ledger of every decision.
- **Evidence instead of impressions.** Sessions, costs and benchmark runs land in a local store with a web UI, so a change to your setup is measured rather than felt.
## Quick Start
About five minutes from clone to a first session.
```
# 1. Clone the latest stable release (master is unreleased, in development)
git clone --branch v2.0.0 https://github.com/gosha70/code-copilot-team.git
cd code-copilot-team
# 2. Install for your tool — see "Choose your tool" below
./scripts/setup.sh --claude-code # Claude Code → ~/.claude/
# 3. Open a project — global rules load automatically
claude-code ~/projects/my-app
```
Every other install path — Pi, Codex, Cursor, Copilot, Windsurf, Aider, the
Claude Code plugin — is in [Install options](https://github.com/gosha70/code-copilot-team/blob/master/docs/install.md).
> **Released as v2.0.0.** Everything this page describes is in the latest
> release and what the Quick Start installs. `master` continues as active
> development; read it as in-development.
```
./scripts/cct list # every feature, command, skill and capability
```
## Choose your tool
Two harnesses enforce the contract at runtime; the rest receive it as rules
they read. The counts come from the [feature catalog](https://github.com/gosha70/code-copilot-team/blob/master/shared/features/catalog.yaml),
so this table cannot drift from what the adapters actually deliver.
| Tool | What it gives you | Install |
| --- | --- | --- |
| `claude-code` | **15 features enforced** — a gate that can block — and 0 more as rules it reads | `./scripts/setup.sh --claude-code` |
| `pi` | **8 features enforced** — a gate that can block — and 6 more as rules it reads | `./scripts/setup.sh --pi` |
| `codex` | **6 features enforced** — a gate that can block — and 9 more as rules it reads | `./scripts/setup.sh --codex` |
| `aider` | 9 features as rules the tool reads; no runtime gate | `./scripts/setup.sh --aider` |
| `cursor` | 9 features as rules the tool reads; no runtime gate | `./scripts/setup.sh --cursor` |
| `github-copilot` | 9 features as rules the tool reads; no runtime gate | `./scripts/setup.sh --github-copilot` |
| `windsurf` | 9 features as rules the tool reads; no runtime gate | `./scripts/setup.sh --windsurf` |
What "enforced" and "advisory" mean, per feature and per capability, is in
[feature maturity](https://github.com/gosha70/code-copilot-team/blob/master/docs/maturity.md) and the generated
[compatibility matrix](https://github.com/gosha70/code-copilot-team/blob/master/shared/capabilities/COMPATIBILITY.md).
## Five minutes each
Three paths that end in something you can check. Each says what to expect and
what to do when it does not happen.
### Your first session
```
claude-code ~/projects/my-app
```
**Expect:** the launcher opens a session with your git branch in the status
line, and the global rules load without being asked for.
**Verify:** ask the agent "which rules are loaded?" — it should name the four
global rules.
**If not:** run `./scripts/cct doctor` — it checks the tools, the
provider profile and each installed adapter, and says which is missing. Then
`./scripts/setup.sh --sync --claude-code`. Full layout:
[configuration layers](https://github.com/gosha70/code-copilot-team/blob/master/docs/configuration-layers.md).
### Your first peer review
```
# Declare a reviewer in ~/.code-copilot-team/providers.toml, then prove it
# answers — the probe command:
scripts/review-round-runner.sh . --probe --peer <name> --subject claude --out /tmp/probe.json
jq '{provider, verdict, duration_sec, error}' /tmp/probe.json
```
**Expect:** exit 0 and a verdict of PASS, FAIL or INCONCLUSIVE.
**Verify:** `claude-code --peer-review <name> ~/projects/my-app` then
`/review-submit` at the end of a phase.
**If not:** exit 2 means nothing in the chain passed its healthcheck; exit 3
means the provider ran and returned no parseable verdict — the answer's tail is
in the file. On releases before v2.0.0, which have no probe, check the provider with
`scripts/providers-health.sh --provider <name>` instead. The ordered setup is
the [auto code review cookbook](https://github.com/gosha70/code-copilot-team/blob/master/docs/auto-code-review-setup.md).
### Your first unattended run
It has prerequisites: an approved SDD bundle for the feature
(`spec.md`, `plan.md`, `tasks.md` and a finalized `verification.yaml`), a
reviewer that answers, and `gh` authenticated for the pull request.
```
/auto-build my-feature # in a session: scaffolds specs/my-feature/automation.json
```
`/auto-build` writes `"profile": "advisory"`, and **advisory publishes
nothing** — it builds and reports. Choose what the run is allowed to do:
`pr` pushes the branch and opens a PR, `merge` additionally arms gated
auto-merge, and `unattended` is the profile that runs without you, which must
be declared in `automation.json` and pass admission first:
```
scripts/validate-spec.sh --unattended --feature-id my-feature # the admission bar
CCT_REVIEW_DIFF_MAX_LINES=4000 scripts/auto-build-loop.sh my-feature --profile unattended
```
**Expect:** admission passes, the driver builds phase by phase under the caps
in `automation.json`, and — on `pr`, `merge` or `unattended` — opens a pull
request at the end.
**Verify:** `session-analytics runs` (or the Studio's Runs tab) shows the run,
its cost against the cap, and each phase's review verdict.
**If not:** admission prints every failure rather than stopping at the first.
Once a run has started, the ledger under `.cct/auto-build/<feature>/` says why
it stopped — `termination.json` names the reason and `triage-report.md` says
whether it can be resumed. See [unattended auto-build](https://github.com/gosha70/code-copilot-team/blob/master/docs/auto-build.md).
## Four-Phase Workflow
| Phase | Model | Effort | Delegation | What Happens |
| --- | --- | --- | --- | --- |
| **Research** | Opus (highest) | High | None | Explore codebase, summarize findings, identify constraints |
| **Plan** | Opus (highest) | High | None | Design approach, get user approval |
| **Build** | Sonnet (fast) | Medium | Yes | Team Lead delegates to specialist sub-agents |
| **Build (loop)** | Sonnet (fast) | Medium | None | Ralph Loop: single agent iterates through stories autonomously |
| **Review** | Opus (highest) | High | None | Holistic review, run tests, verify consistency |
Each phase has a dedicated agent (`~/.claude/agents/`) that loads the relevant rules from the rules library. Planning and research must stay in one mind — sub-agents only see fragments and can't reason about the whole system. Delegation only happens during Build. For smaller features, **Ralph Loop** provides a single-agent alternative: read PRD → implement next failing story → test → commit → repeat.
[Four-phase agent workflow — Research, Plan, Build, Review](https://github.com/gosha70/code-copilot-team/blob/master/docs/images/four-phase-workflow.svg)
## Working in a project
```
claude-code init ml-rag ~/projects/my-rag-app # start from a template
claude-code ~/projects/existing-api # or just point at an existing project
git pull && ./scripts/setup.sh --sync --claude-code # after pulling repo updates
claude-code sync ~/projects/my-rag-app --dry-run # preview what would change
claude-code sync ~/projects/my-rag-app # apply
```
Sync updates commands and `.claude/` contents but never overwrites your
`CLAUDE.md`. The eleven templates and their agent teams are in
[project templates](https://github.com/gosha70/code-copilot-team/blob/master/docs/project-templates.md).
## Everything it does
Maturity labels are defined in [feature maturity](https://github.com/gosha70/code-copilot-team/blob/master/docs/maturity.md); a feature
marked `unreleased` is on `master` only. The full index with adapter support
per feature is [docs/features.md](https://github.com/gosha70/code-copilot-team/blob/master/docs/features.md), or ask the CLI:
```
./scripts/cct features # one line per feature
./scripts/cct features --adapter pi # what your tool actually enforces
./scripts/cct features --feature auto-build
```
- **[Spec-driven development](https://github.com/gosha70/code-copilot-team/blob/master/docs/spec-driven-development.md)** — A feature is specified, planned and task-listed in `specs/<feature-id>/` before any code is written, with an origin-alignment gate that stops the build when the working spec drifts from what the user asked for.
- **[Four-phase agent workflow](https://github.com/gosha70/code-copilot-team/blob/master/shared/skills/phase-workflow/SKILL.md)** — Work moves through Research, Plan, Build and Review with a single agent in every phase but Build, where a Team Lead delegates to sub-agents; phase transitions are gated on verification.
- **[Shape-Up product bets](https://github.com/gosha70/code-copilot-team/blob/master/docs/shape-up-workflow.md)** — Rough ideas become pitches with an appetite, scopes and a circuit breaker; bets run against a hill chart and end in a retrospective and a cooldown report.
- **[Peer review by a second model](https://github.com/gosha70/code-copilot-team/blob/master/docs/auto-code-review-setup.md)** — A second provider reviews the diff in a read-only sandbox and returns a PASS, FAIL or INCONCLUSIVE verdict with findings; the phase cannot complete on a FAIL, and a failed reviewer falls back down a chain.
- **[Unattended auto-build runs](https://github.com/gosha70/code-copilot-team/blob/master/docs/auto-build.md)** *(beta)* — An approved feature is built phase by phase by a driver outside the session, with a gating reviewer per phase, bounded fix sessions, a cost and wall-clock cap,