A Claude Code skill that orchestrates a full plan-led planning → dual plan gate → execute → verify → PM delivery gate → final-review coalition pipeline.
The fullstack-engineer executor uses backend priority: Copilot → Claude-native → Codex (tertiary fallback).
/teamwork:task <your feature or fix>
│
▼
team-lead (orchestrates only — never modifies files directly)
├── planner-lead → orchestrates researcher + designer + linter and writes plan directly
│ ├── researcher(s) → scoped parallel research workers
│ └── designer → design output when required
│ └── linter → layered dependency lint contract + CI gate
├── plan-reviewer + pm (joint plan gate, both must pass)
├── fullstack-engineer (parallel where possible)
│ auto-selects: Copilot → Claude-native → Codex
├── verifier → runs verification commands
├── pm → supervises task outcomes and test evidence
├── final-reviewer → runs code review + leads specialty review coalition
│ ├── security-reviewer
│ ├── devil-advocate
│ ├── a11y-reviewer
│ ├── perf-reviewer
│ └── user-perspective
└── git-monitor → (optional) commit, PR creation, CI/comment monitoring
Plugins in Claude Code are optional but recommended:
Codex plugin (by OpenAI):
/plugin marketplace add openai/codex-plugin-cc
/plugin install codex@openai-codex
Copilot plugin (this org):
/plugin marketplace add LeePepe/copilot-plugin-cc
/plugin install copilot@copilot-local
Then reload:
/reload-plugins
Run setup only for the plugins you installed:
/codex:setup # only if codex plugin was installed
/copilot:setup # only if copilot plugin was installed
Fallback policy:
- Copilot available: prioritize Copilot-backed role execution
- Copilot unavailable: use Claude-native role execution
- Codex is tertiary fallback (used when prior options are unavailable or explicitly disallowed)
- Plan phase ownership:
planner-leadowns research consolidation, design handoff, and plan generation
/plugin marketplace add LeePepe/teamwork
/plugin install teamwork@LeePepe
/reload-plugins
Then run setup (--repo by default, or pass --global for global install):
/teamwork:setup
/teamwork:setup --global
Equivalent CLI fallback (including Codex sessions without slash commands):
bash scripts/setup.sh --repo
bash scripts/setup.sh --globalThis repository now includes Codex plugin metadata and skill entrypoints:
.codex-plugin/plugin.jsonskills/teamwork/SKILL.mdskills/teamwork-retro/SKILL.md
Install for Codex via native skill discovery:
git clone https://github.com/LeePepe/teamwork.git ~/.codex/teamwork
mkdir -p ~/.agents/skills
ln -sfn ~/.codex/teamwork/skills/teamwork ~/.agents/skills/teamwork
ln -sfn ~/.codex/teamwork/skills/teamwork-retro ~/.agents/skills/teamwork-retroThen restart Codex.
Setup now uses a lightweight default:
- Does not preload runtime agents by default
- Loads agents progressively by stage from the skill bundle/plugin assets:
- planning stage:
planner-lead(dispatchesresearcher,designer,linterwhen needed) - plan gate stage:
plan-reviewer+pm - execution stage:
fullstack-engineer,verifier,pm,final-reviewer, optionalgit-monitor
- planning stage:
Planning policy:
planner-leadconsolidates scoped research and directly produces plandesigneris dispatched byplanner-leadwhen design output is required- plan gate is dual-key:
plan-reviewer(technical) +pm(product)
Delivery policy:
pmsupervises whether task results and test evidence satisfy user-facing acceptance criteriaverifierremains the source of command-level test evidencefinal-reviewerperforms code review and aggregates specialty reviewer findings- lint is mandatory in verifier and CI: layered dependency violations block merge
- canonical dependency layers:
Types -> Config -> Repo -> Service -> Runtime -> UI - lower layers cannot reverse-depend on upper layers
- lint errors must explain: why rule exists + correct fix direction (for agent self-repair)
Verification policy:
- verifier uses cache keyed by repo state + verification command set
- exact cache hit may be reused; cache miss runs commands and writes result back
If you prefer legacy behavior (preload all runtime agents), use:
/teamwork:setup --full-agents
or:
bash scripts/setup.sh --repo --full-agentsCheck status at any time:
/teamwork:setup --check
or:
bash scripts/setup.sh --check/teamwork:task implement a JWT auth middleware for the Express API
/teamwork:task refactor the payment module to use the new Stripe SDK
/teamwork:mapping-repo # Map and document repo architecture (produces ARCHITECTURE.md + docs/)
/teamwork:mapping-repo --update # Refresh existing architecture docs
Run /teamwork:mapping-repo to map and document this repository's architecture. The command produces ARCHITECTURE.md at repo root, topic files in docs/, and a simplified AGENTS.md index — following the harness engineering approach of treating documentation as a machine-readable contract.
If you see direct Bash/Write/Edit implementation in the main session, usually one of these happened:
- The task was not started with
/teamwork:task ...(or an explicit "use teamwork" request), so the teamwork skill never activated. team-leadcould not be loaded; run/teamwork:setup --check(orbash scripts/setup.sh --check) and ensureteam-lead.mdexists in plugin/repo assets.- The command was run before setup in that repo; run
/teamwork:setup(orbash scripts/setup.sh --repo).
This is usually an upstream model capacity error, but large startup context can make it more likely.
If this appears right after installing this skill:
- Re-run setup:
/teamwork:setup(orbash scripts/setup.sh --repo) - Verify status:
/teamwork:setup --check(orbash scripts/setup.sh --check) - Check for recursive teamwork plugin cache growth:
If this prints paths, clean cache:
find ~/.claude/plugins/cache/teamwork -type d -path "*/teamwork/*/teamwork/*" | head
Then runrm -rf ~/.claude/plugins/cache/teamwork/reload-pluginsin Claude Code. - Retry once or twice (the error is often transient).
- As a quick diagnostic, run:
If this succeeds consistently while normal mode fails, your loaded skills/agents context is likely too heavy.
claude -p "hi" --disable-slash-commands
Run /teamwork:setup inside your repo (or bash scripts/setup.sh --repo) — it creates .claude/team.md from the template automatically. Then edit it to set routing rules, review mode, and verification commands:
## Routing
- *.swift → copilot
- *.ts → codex
## Review Mode
default: adversarial-review
## Verification
- npm run lint
- npm testAdd repo-aware agent definitions to .claude/agents/ in your repo:
.claude/agents/fullstack-engineer.md— unified executor, knows your project conventions and test setup.claude/agents/planner-lead.md— unified planning owner (research + design + plan).claude/agents/researcher.md— gathers repo/external context and writes planning briefs.claude/agents/designer.md— produces design plan artifacts for design-heavy requests.claude/agents/pm.md— co-approves plan and supervises task/test delivery.claude/agents/verifier.md— enforces repo-specific verification strategy and output style.claude/agents/final-reviewer.md— leads coalition review + final code review
Project-level agents automatically override global ones.
Routing is determined by task weight/rigor, not file type:
| Executor | Task Types |
|---|---|
codex |
Rigorous or heavy tasks: complex algorithms, security-sensitive code, auth/authz, data migrations, strict correctness, large-scale refactors, critical business logic |
copilot |
All other tasks: UI changes, simple features, scripts, config, exploratory code, docs, straightforward bug fixes |
- codex-plugin-cc — OpenAI's Codex plugin
- copilot-plugin-cc — Copilot CLI plugin