From rptc
Agent Teams execution mode for RPTC. Invoke explicitly when coordinating multiple independent work streams across parallel agent sessions — batch features, parallel bug fixes, or sprint items that don't share files. Orchestrates team creation with RPTC-compliant spawn prompts, file ownership boundaries, approval flow, and completion integration. For team-based single-feature or single-bug workflows, prefer `/rptc:feat-team` or `/rptc:fix-team` — this skill targets multi-stream batch work.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rptc:agent-teamsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill adds Agent Teams as a first-class execution path in RPTC. When a task
This skill adds Agent Teams as a first-class execution path in RPTC. When a task (or set of tasks) benefits from parallel independent sessions, this skill handles team creation, RPTC-compliant spawn prompts, file ownership, approval flow, and completion integration.
Agent Teams are independent Claude Code sessions coordinating via a shared task
list and peer-to-peer inbox messaging. Each teammate gets its own context window,
automatically loads the project's CLAUDE.md, MCP servers, and .claude/skills/.
Compatibility:
/rptc:feat or /rptc:fix. Users who want team-based single-feature or single-bug workflows invoke /rptc:feat-team or /rptc:fix-team directly. This skill targets multi-stream batch work (multiple independent features or fixes processed in parallel) and is invoked explicitly by the main agent.| Path | Invocation | Use When |
|---|---|---|
| Single feature, persistent team | /rptc:feat-team "<feature>" | One complex feature benefiting from continuous cross-agent feedback (architect + reviewer monitor every step). Does NOT use this skill. |
| Single bug, persistent team | /rptc:fix-team "<bug>" | One complex bug where root cause is unclear (architect applies 5 Whys, reviewer tracks regression coverage). Does NOT use this skill. |
| Multiple independent streams, parallel batch | Invoke this skill directly (Skill tool or main agent judgment) | User describes multiple distinct features/fixes that don't share files and each justifies its own session (>10 min work). |
When this skill activates, the main agent becomes the Team Lead. It manages teammates who each run their own RPTC phases at the appropriate autonomy level, instead of running each stream sequentially through standard RPTC itself.
User invokes skill (explicit or via main agent judgment on multi-stream work)
↓
TEAMS ANALYSIS (this skill) — verify the work actually benefits from teams
├─ Confirms: multiple independent streams, each substantial
└─ Creates team with RPTC-compliant spawn prompts
├─ Assigns tasks with file ownership boundaries
├─ Teammates execute their RPTC flows
├─ Team Lead coordinates approvals + integration
└─ Team Lead runs final verification
Recursion Guard (MANDATORY):
Run this analysis when this skill is invoked, before creating any team. Evaluate three signals:
The strongest signal for teams. Look for:
Examples that qualify:
Examples that don't qualify:
Less common, but valuable when different perspectives need to actively challenge each other — not just report independently (RPTC Phase 4 already does parallel independent reports).
Debate adds value for:
If the user says "use a team," "run these in parallel," "use agent teams," or similar — respect the request. Still perform the analysis to determine autonomy levels, but don't override their intent.
| Signals | Route |
|---|---|
| No signals → | Stop here — the task doesn't meet teams criteria. Inform the user and suggest a standard command (/rptc:feat, /rptc:fix, /rptc:feat-team, or /rptc:fix-team) based on scope. |
| Signal 1 (multiple independent streams) → | Teams mode, continue below |
| Signal 2 only (debate for single task) → | Teams mode with debate pattern (see reference) |
| Signal 3 (user requested) → | Teams mode, continue below |
If the analysis shows teams mode isn't appropriate, report the reason to the user and stop. The rest of this document covers teams mode orchestration when the analysis routes to teams.
Before creating the team, determine how much RPTC each teammate runs independently. This depends on how independent the tasks are.
When: Tasks are fully independent — different features, different file sets, no shared dependencies.
Each teammate runs the complete flow: Discovery → Architecture → Implementation → Quality Verification → Complete. The Team Lead only coordinates task assignment, collects results, and runs final integration verification.
Approval handling: Pre-authorize plan selection (Pragmatic default) and high-confidence quality fixes (≥90%) in the spawn prompt. Teammates flag low-confidence findings (80-89%) in their completion message for PM review.
When: Tasks relate to the same feature area but implementation is parallelizable. The Team Lead should run Discovery and Architecture centrally (to ensure a coherent plan), then spawn teammates for parallel TDD execution of independent plan steps.
Team Lead runs: Phase 1 (Discovery) + Phase 2 (Architecture) → user approves plan Teammates run: Phase 3 (Implementation) + report findings Team Lead runs: Phase 4 (Quality Verification) + Phase 5 (Complete)
Approval handling: User approved the plan already. Teammates execute assigned steps and report back. Team Lead consolidates and runs quality verification.
When: Using teams for adversarial review, competing debug hypotheses, or architecture debate. No teammate runs the standard RPTC phases — they operate as focused specialists.
Team Lead runs RPTC normally through Phase 3, then spawns review teammates with specific debate prompts instead of (or in addition to) standard Phase 4 agents.
| Scenario | Level | Reasoning |
|---|---|---|
| 3 independent features | A | Fully separate streams |
| 5 independent bug fixes | A | Each fix is self-contained |
| Complex feature, 6+ plan steps, parallelizable | B | Coherent plan, parallel execution |
| Cross-layer feature (FE + BE + DB) with shared API contract | B | Need unified architecture, separate impl |
| Mystery bug, 3 theories | C | Debate pattern |
| Security-focused deep review of completed work | C | Specialist review |
After determining the autonomy level, create the team.
Before spawning any teammate, map out which files/directories each will own. This is non-negotiable — Agent Teams have no file locking. Last write wins.
Read references/team-lifecycle.md § File Ownership for strategies and
enforcement patterns.
Rules:
Each teammate gets a spawn prompt that embeds their RPTC operating context.
Read references/spawn-prompts.md for ready-to-use templates by autonomy level.
Every spawn prompt includes:
Ask the user for confirmation before creating the team. Present:
Use natural language to request team creation:
Create an agent team called "[project]-[scope]" with [N] teammates:
- [teammate-1-name]: [assignment summary]
- [teammate-2-name]: [assignment summary]
While teammates work:
After all teammates complete:
RPTC's PM approval gates are the biggest coordination challenge with teams. Here's how this skill handles them:
| Gate | Pre-Authorization |
|---|---|
| Plan approach selection | Choose Pragmatic unless clearly inappropriate |
| Plan approval | Approve and proceed (teammate's own plan for their scope) |
| High-confidence quality findings (≥90%) | Auto-fix, report in completion summary |
| Gate | Batching Strategy |
|---|---|
| Low/medium-confidence findings (80-89%) | Teammate includes in completion message → Team Lead collects all → presents batch to user |
| Architectural concerns or scope questions | Teammate messages Team Lead → Lead escalates to user |
| Blocked/stuck teammates | Team Lead detects via task list, escalates to user |
The user never receives approval requests directly from teammates. The Team Lead is always the intermediary, keeping the PM experience organized.
Even when signals are present, skip teams mode if:
Read these when executing teams mode — they contain the templates and detailed procedures that this skill references:
| Document | When to Read | Contents |
|---|---|---|
references/spawn-prompts.md | Step 2 (building spawn prompts) | Ready-to-use templates for Level A, B, and C autonomy. RPTC directive blocks, approval pre-auth language, completion protocols |
references/team-lifecycle.md | Steps 1, 4, 5 (ownership, monitoring, integration) | File ownership strategies, hook-based enforcement, shared file protocol, monitoring patterns, shutdown procedures, cost guidance |
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub kuklaph/rptc-workflow --plugin rptc