skills/team-implement/SKILL.md
Spec-driven team orchestration: adaptive development team scaling from 3 to 11 agents based on complexity.
npx skillsauth add mgiovani/cc-arsenal team-implementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Adaptive spec-driven development team that scales from 3 agents (lite) to 11 agents (full) based on project complexity. All planning completes before any code changes, with explicit user approval between planning and implementation.
Full mode requires the experimental agent teams flag. Add to your environment or settings.json:
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
Lite mode works without this flag (uses Task subagents instead of Teammate API).
Delegate mode (recommended for full mode): Press Shift+Tab to enable delegate mode, which restricts the lead to coordination-only tools and prevents it from implementing tasks itself. Without delegate mode, always wait for teammates to complete their tasks before proceeding — do not implement tasks yourself.
$ARGUMENTS
/resume does not restore teammates. If a session is interrupted mid-team, teammates are lostMACRO PHASE A: PLANNING (no code changes)
Phase 0: Input Ingestion & Discovery
Phase 1: Clarifying Questions
Phase 2: Specification
Phase 3: Architecture & Design
Phase 4: Adversarial Review
Phase 5: Task Decomposition
══════════════════════════════════════
USER APPROVAL GATE
══════════════════════════════════════
MACRO PHASE B: IMPLEMENTATION (code changes)
Phase 6: Implementation
Phase 7: Quality Assurance
Phase 8: Documentation & Delivery
Phase 9: Teardown
Parse $ARGUMENTS to determine the input type. For detection patterns and ingestion commands, see references/spec-workflow.md Section 1.
Detection order (first match wins):
| Pattern | Source Type | Ingestion |
|---------|-----------|-----------|
| PROJ-123 | Jira ticket | jira issue view PROJ-123 --json |
| #42 or owner/repo#42 | GitHub issue | gh issue view 42 --json title,body,labels,comments |
| !123 or PR URL | GitHub PR | gh pr view 123 --json title,body,files,comments,labels |
| Existing file path | File | Read file content |
| Existing directory path | Directory | Read README.md, CLAUDE.md, key files |
| http:// or https:// | URL | WebFetch to extract content |
| Everything else | Plain text | Use directly as requirements |
Spawn an Explore/haiku agent to understand the project:
Task tool (Explore, haiku):
"Discover the project's technology stack and development workflow:
1. Read CLAUDE.md and README.md for project context
2. Check for task runners: Makefile, package.json, pyproject.toml
3. Identify test, lint, build, dev server commands
4. Map major components and modules
5. Note frameworks, databases, authentication patterns
6. Find existing patterns and conventions
Return: structured summary of project architecture and available commands."
Evaluate complexity signals to determine team mode. See references/spec-workflow.md Section 2 for the full scoring matrix.
| Signal | +2 (Full) | +1 (Medium) | 0 (Lite) | |--------|-----------|-------------|----------| | Components affected | 3+ (frontend + backend + DB + infra) | 2 components | Single component | | Security sensitivity | Auth, payments, PII | Permission checks | No sensitive data | | Performance requirements | Real-time, SLAs | Caching, optimization | Standard CRUD | | External integrations | 2+ APIs/services | 1 external API | Self-contained | | Estimated file changes | 15+ files | 10-14 files | <10 files | | Domain familiarity | Unfamiliar tech | Partially familiar | Well-understood |
Thresholds:
Create .specs/<short-id>/ directory. Format: <slugified-title>-<YYYYMMDD> (e.g., auth-oauth2-20260205). See references/spec-workflow.md Section 3 for the generation algorithm.
.specs/<short-id>/ directory.specs/<short-id>/input-digest.md using template from references/spec-templates.md.specs/<short-id>/README.md (session dashboard).specs/README.md (global index) — create if first spec sessionIf .specs/ does not already exist in git or .gitignore, ask the user:
AskUserQuestion:
question: "How should .specs/ be handled in git?"
options:
- "Commit to git (specs are part of the project)"
- "Add to .gitignore (specs are local-only)"
Present the mode decision and team composition to the user for confirmation:
AskUserQuestion:
question: "Complexity assessment complete. Proceed with this team?"
options:
- "[MODE] mode with [ROLES] (Recommended)"
- "Switch to [OTHER_MODE] mode"
- "Customize team composition"
Full mode team spawn:
Teammate({ operation: "spawnTeam", team_name: "team-<short-id>" })
CRITICAL: Before any planning begins, analyze the input digest for ambiguities.
Look for:
Use AskUserQuestion to resolve ambiguities. Multiple rounds are fine. Only proceed when requirements are clear enough to specify.
If the input is already well-defined (e.g., detailed Jira ticket with acceptance criteria), this phase can be brief or skipped.
Spawn Product Manager and Scrum Master (Wave 1). See references/agent-catalog.md for complete prompt templates.
Task tool (team_name: "team-<short-id>", name: "product-manager"):
subagent_type: general-purpose
model: sonnet
prompt: [Product Manager prompt from agent-catalog.md, substituting SPEC_ID and project context]
Product Manager writes:
.specs/<short-id>/proposal/brief.md.specs/<short-id>/proposal/requirements.md.specs/<short-id>/proposal/acceptance-criteria.mdScrum Master reviews for completeness.
Gate: Spec Review — Orchestrator validates coherence, asks user about remaining gaps.
Spawn Product Analyst subagent (via Task, not Teammate). See references/agent-catalog.md Combined Agent 12.
Product Analyst writes:
.specs/<short-id>/brief.md.specs/<short-id>/design.md (combined)Spawn Architect (Wave 2, opus model). See references/agent-catalog.md Agent 3.
Task tool (team_name: "team-<short-id>", name: "architect"):
subagent_type: general-purpose
model: sonnet
prompt: [Architect prompt from agent-catalog.md]
Architect writes:
.specs/<short-id>/design/architecture.md.specs/<short-id>/design/api-contracts.md.specs/<short-id>/design/data-model.md.specs/<short-id>/design/diagrams/system-overview.md.specs/<short-id>/decisions/NNNN-*.md (lightweight ADRs)Architect/Developer subagent writes .specs/<short-id>/design.md (combined). See references/agent-catalog.md Combined Agent 13.
Spawn Adversary Reviewer (Wave 3). See references/agent-catalog.md Agent 11.
Adversary reviews ALL spec + design artifacts and writes:
.specs/<short-id>/review/adversary-report.mdFindings rated as: BLOCKER | WARNING | SUGGESTION
If BLOCKERs found:
QA/Reviewer subagent challenges design and writes .specs/<short-id>/review.md. If BLOCKERs: orchestrator feeds back, spawns revision subagent.
Scrum Master (from Wave 1, still active) creates:
.specs/<short-id>/tasks/task-breakdown.md.specs/<short-id>/tasks/task-graph.md (Mermaid dependency graph)Orchestrator creates TaskCreate entries with dependencies via the Task Management System. Target 5-6 tasks per teammate — too small wastes coordination overhead, too large risks wasted effort without check-ins.
Orchestrator creates .specs/<short-id>/tasks.md with breakdown and Mermaid graph, then initializes tasks via TaskCreate.
Present the complete plan to the user via AskUserQuestion:
AskUserQuestion:
question: "Planning complete for [TITLE]. Specs at .specs/<short-id>/. [N] requirements, [M] tasks, [K] parallelizable. Ready to proceed?"
options:
- "Approve and begin implementation"
- "Request changes (I'll describe what to modify)"
- "Save spec only — do not implement"
- "Cancel"
Option 3 (spec-only): Users may want just the planning artifacts without code changes. Skip to Phase 9 (teardown).
If changes requested: Jump back to the relevant phase (spec, architecture, or tasks) based on user feedback.
Only after user approval.
Spawn implementation agents in parallel (Wave 5). See references/agent-catalog.md Agents 4-5.
# Spawn in parallel
Task tool (team_name: "team-<short-id>", name: "frontend-dev"):
subagent_type: general-purpose, model: sonnet
prompt: [Frontend Developer prompt from agent-catalog.md]
Task tool (team_name: "team-<short-id>", name: "backend-dev"):
subagent_type: general-purpose, model: sonnet
prompt: [Backend Developer prompt from agent-catalog.md]
Each agent:
File scope enforcement: Frontend and backend agents have strict boundaries. See references/communication-patterns.md Section 5 for conflict prevention.
Orchestrator commits incrementally after each agent completes.
Architect/Developer subagent implements sequentially per spec. Writes tests, runs quality checks.
Spawn QA Engineer (Wave 6) + optional specialized agents. See references/agent-catalog.md Agent 6.
QA Engineer:
.specs/<short-id>/review/qa-plan.mdOptional agents (spawn based on spec):
Adversary Reviewer (2nd pass) challenges the implementation.
Gate: Quality Verification — All tests pass, no critical findings. If failures: loop to Phase 6 (max 3 retries). See references/spec-workflow.md Section 6.
QA/Reviewer subagent validates: run tests, lint, check acceptance criteria. If failures: loop to Phase 6.
Spawn Tech Writer (Wave 7, haiku model). See references/agent-catalog.md Agent 10.
Tech Writer updates:
.specs/<short-id>/README.md (final status)Orchestrator handles minimal doc updates.
shutdown_request to all remaining agents (see references/communication-patterns.md Section 6)shutdown_response from eachTeammate({ operation: "cleanup" }).specs/<short-id>/README.md with final status.specs/<short-id>/README.md with final status| Gate | Between Phases | Pass Criteria | On Failure | Max Retries | |------|---------------|---------------|------------|-------------| | Clarifying Questions | 0 → 2 | All ambiguities resolved | More questions | Unlimited | | Spec Review | 2 → 3 | Requirements complete, criteria clear | Revise specs | 2 | | Adversarial Review | 3 → 5 | Zero BLOCKER findings | Architect revises | 2 | | User Approval | 5 → 6 | User approves full plan | Revise or cancel | Unlimited | | Quality Verification | 6 → 8 | Tests pass, no critical findings | Loop to Phase 6 | 3 | | Final Delivery | 8 → done | Spec artifacts exist, all tasks done | Block completion | 1 |
For complete prompt templates and activation criteria, see references/agent-catalog.md.
| Role | Model | Phase | Full Mode | Lite Mode | |------|-------|-------|-----------|-----------| | Product Manager | sonnet | 2 | Dedicated | Combined as Product Analyst | | Scrum Master | sonnet | 2, 5 | Dedicated | Combined as Product Analyst | | Architect | sonnet | 3 | Dedicated | Combined as Architect/Developer | | Frontend Developer | sonnet | 6 | Dedicated | Combined as Architect/Developer | | Backend Developer | sonnet | 6 | Dedicated | Combined as Architect/Developer | | QA Engineer | sonnet | 7 | Dedicated | Combined as QA/Reviewer | | Security Engineer | sonnet | 7 | Conditional | Combined as QA/Reviewer | | Performance Engineer | sonnet | 7 | Conditional | — | | Infrastructure/DevOps | sonnet | 7 | Conditional | — | | Tech Writer | sonnet | 8 | Dedicated | — | | Adversary Reviewer | sonnet | 4, 7 | Dedicated | Combined as QA/Reviewer |
Agents spawn per phase and shut down when done to minimize cost:
| Wave | Phases | Agents | Shutdown After | |------|--------|--------|---------------| | 1 | 1-2, 5 | Product Manager, Scrum Master | Phase 5 | | 2 | 3 | Architect | Phase 3 | | 3 | 4 | Adversary Reviewer | Phase 4 | | 5 | 6 | Frontend Dev, Backend Dev (conditional) | Phase 6 | | 6 | 7 | QA Engineer + optional Security/Perf/Infra | Phase 7 | | 7 | 8 | Tech Writer | Phase 8 |
See references/spec-workflow.md Section 5 for details.
All inter-agent communication uses SendMessage. See references/communication-patterns.md for templates covering:
Key rules:
type: "message" (direct). Only use type: "broadcast" for critical team-wide issues.All artifacts are namespaced under .specs/<short-id>/. See references/spec-templates.md for all templates.
.specs/<short-id>/
├── README.md # Session dashboard
├── input-digest.md # Normalized input
├── proposal/
│ ├── brief.md
│ ├── requirements.md
│ └── acceptance-criteria.md
├── design/
│ ├── architecture.md
│ ├── api-contracts.md
│ ├── data-model.md
│ └── diagrams/
│ └── system-overview.md
├── review/
│ ├── adversary-report.md
│ ├── security-assessment.md
│ └── qa-plan.md
├── tasks/
│ ├── task-breakdown.md
│ └── task-graph.md
└── decisions/
└── 0001-decision-title.md
.specs/<short-id>/
├── README.md
├── input-digest.md
├── brief.md
├── design.md
├── review.md
└── tasks.md
See references/spec-workflow.md Section 7 for recovery strategies covering:
.specs/, offer resume)# Plain text description
/team-implement Add user authentication with OAuth2 and JWT
# GitHub issue
/team-implement #42
/team-implement owner/repo#42
# Jira ticket
/team-implement PROJ-123
# GitHub PR (spec for changes needed)
/team-implement !456
# File with requirements
/team-implement ./docs/requirements.md
# URL with spec
/team-implement https://example.com/feature-spec
# Directory to analyze
/team-implement ./src/auth/
.specs/ artifactsdevelopment
Generate comprehensive test suites with coverage analysis and parallel test writing. Automatically activates when users want to write tests, add test coverage, generate test cases, improve testing, or analyze coverage gaps. Supports pytest, vitest, jest, and all major test frameworks.
development
Multi-agent PR review team orchestration with 7 specialized reviewers for security-sensitive or architectural PRs. Spawns architecture, security, performance, testing, style, docs/UX, and adversary reviewers as a coordinated team. Premium review for critical code changes.
development
Perform comprehensive security review targeting OWASP Top 10 2025 vulnerabilities for PRs, commits, or entire codebases. This skill should be used when a user wants to audit code security, scan for vulnerabilities, review security posture, or check for OWASP compliance. Analysis only - identifies vulnerabilities without modifying code.
development
Perform comprehensive performance review analyzing database queries, algorithmic complexity, frontend bottlenecks, and resource leaks for PRs, commits, or entire codebases. This skill should be used when a user wants to audit code performance, identify bottlenecks, review query efficiency, or check for memory leaks. Analysis only - identifies issues without modifying code.