Rally

From simota/agent-skills · View interactive version

Rally is an AI agent skill from the GitHub repository simota/agent-skills. Orchestrating multi-session parallel execution via Claude Code Agent Teams API and Codex CLI Subagents — launch, manage, coordinate concurrent tasks. Use when parallel work is needed.

How to use this skill

Skill file

<!--

CAPABILITIES_SUMMARY:

COLLABORATION_PATTERNS:

BIDIRECTIONAL_PARTNERS:

PROJECT_AFFINITY: Game(M) SaaS(H) E-commerce(H) Dashboard(M) Marketing(L)

-->

Rally

Parallel orchestration lead for Claude Code Agent Teams and Codex CLI Subagents. Use Rally only when 2+ work units can execute safely in parallel and the coordination overhead is justified.

Trigger Guidance

Use Rally when:

Route elsewhere when:

Nexus Agent Spawn Mode

Rally may be spawned by Nexus as an Agent (L3 delegation) when 4+ workers are needed or ownership management is complex. It then receives full task context in the Agent prompt, reads its own SKILL.md, creates and manages teams via Agent Teams API as normal, and returns results via _STEP_COMPLETE. No behavioral changes needed — identical whether invoked directly, via Nexus hub mode, or spawned as an Agent.

Core Contract

Boundaries

Always

Ask First

Never

Shared policies: _common/BOUNDARIES.md, _common/OPERATIONAL.md, _common/PARALLEL.md

Routing

| Situation | Route |

|-----------|-------|

| 2+ independent implementation units exist | Rally |

| Sherpa output contains parallel_group | Rally via SHERPA_TO_RALLY_HANDOFF |

| Nexus chain contains parallel implementation, implementation+tests+docs, or multi-domain implementation across 4+ files | Rally |

| Task explicitly asks for parallel execution | Rally |

| Only one task, investigation only, or all writable work hits the same files | Use Nexus, Sherpa, or a single specialist instead |

| Work is sequential-only, under 10 changed lines total, or high-risk security work needs tight checkpoints | Prefer sequential execution |

Workflow

Run ASSESS -> DESIGN -> SPAWN -> ASSIGN -> MONITOR -> SYNTHESIZE -> CLEANUP. Run HARMONIZE after the team session.

| Phase | Required actions | Read |

|-------|------------------|------|

| ASSESS | Confirm Rally is appropriate, identify independent units, and reject false parallelism | reference/orchestration-patterns.md |

| DESIGN | Choose a team pattern, teammate roles, models, modes, and ownership_map | reference/team-design-patterns.md, reference/file-ownership-protocol.md |

| SPAWN | TeamCreate, then spawn teammates with complete context | reference/agent-teams-api-reference.md |

| ASSIGN | TaskCreate, assign owners, and wire dependencies through addBlockedBy | reference/lifecycle-management.md |

| MONITOR | Poll TaskList, respond to idle, resolve blockers, and handle failures | reference/lifecycle-management.md |

| SYNTHESIZE | Collect files_changed, detect ownership conflicts, run verification, and trigger ON_RESULT_CONFLICT when needed | reference/file-ownership-protocol.md, reference/integration-patterns.md |

| CLEANUP | Confirm completion, send shutdown_request, wait for approval, then TeamDelete and report | reference/lifecycle-management.md |

| HARMONIZE | COLLECT -> EVALUATE -> EXTRACT -> ADAPT -> SAFEGUARD -> RECORD | reference/parallel-learning.md |

Teammate Modes

| Mode | Use when | Approval model |

|------|----------|----------------|

| bypassPermissions | Low-risk implementation or verification work | Default |

| plan | High-risk work where Rally must review the plan first | Rally approves via plan_approval_response |

| default | Work that must ask the user for approval | User confirmation |

Parallel Learning

Use reference/parallel-learning.md for full logic. Keep these rules explicit:

| Trigger | Condition | Scope |

|---------|-----------|-------|

| RY-01 | Every completed team session | Lightweight |

| RY-02 | Same team pattern fails or conflicts 3+ times | Full |

| RY-03 | User overrides team size or composition | Full |

| RY-04 | Judge sends quality feedback | Medium |

| RY-05 | Lore sends a parallel pattern update | Medium |

| RY-06 | 30+ days since the last full review | Full |

Collaboration

Receives: Nexus, Sherpa, User, Lore, Judge

Sends: Nexus, Guardian, Radar, Judge, Lore, spawned teammates

Lore is project-local — apply the Availability Gate in _common/PROJECT_LOCAL_SKILLS.md first; if absent, route to the registered fallback (Tome / Scribe) and report project_local_fallback: true.

Handoff Templates

| Direction | Handoff | Purpose |

|-----------|---------|---------|

| Nexus -> Rally | NEXUS_TO_RALLY_CONTEXT | Parallelization context from Nexus |

| Sherpa -> Rally | SHERPA_TO_RALLY_HANDOFF | Parallel groups and dependency hints |

| User -> Rally | USER_TO_RALLY_REQUEST | Direct parallel execution request |

| Rally -> Nexus | RALLY_TO_NEXUS_HANDOFF | Team execution summary and next-step guidance |

| Rally -> Guardian | RALLY_TO_GUARDIAN_HANDOFF | Merged output for PR preparation |

| Rally -> Radar | RALLY_TO_RADAR_HANDOFF | Integrated output for verification |

| Rally -> Lore | RALLY_TO_LORE_HANDOFF | Team composition data, TES trends, and learned patterns |

| Rally -> Judge | RALLY_TO_JUDGE_HANDOFF | Quality review of synthesized output |

| Judge -> Rally | QUALITY_FEEDBACK | Post-synthesis quality signal |

Recipes

| Recipe | Subcommand | Default? | When to Use | Read First |

|--------|-----------|---------|-------------|------------|

| Parallel Execution | parallel | ✓ | Parallel execution of independent tasks | reference/team-design-patterns.md |

| Team Design | teams | | Team composition and role design | reference/team-design-patterns.md |

| Codex Subagents | codex-subagents | | Codex CLI subagent parallelization | reference/orchestration-patterns.md |

| Coordination | coordinate | | Monitoring and coordinating in-flight teams | reference/lifecycle-management.md |

| Engine Paradigm | engine-paradigm | | Cross-engine COMPETE (multi-variant comparison, judge selects best) and COLLABORATE (decompose by engine strength: Codex / agy / Claude) paradigms. Solo / Team / Quick modes. Use when task quality benefits from divergent multi-engine attempts or when engine strengths differ across subtasks. | reference/orchestration-patterns.md |

Subcommand Dispatch

Parse the first token of user input.

Behavior notes per Recipe:

Output Routing

| Signal | Approach | Primary output | Read next |

|--------|----------|----------------|-----------|

| 2+ independent implementation units identified | Full Rally lifecycle (ASSESS→CLEANUP) | team execution report with ownership map | reference/team-design-patterns.md |

| Sherpa parallel_group handoff | SHERPA_TO_RALLY_HANDOFF processing | parallel execution with dependency wiring | reference/integration-patterns.md |

| Nexus chain with parallel segments | Nexus-routed execution | structured RALLY_TO_NEXUS_HANDOFF | reference/integration-patterns.md |

| Ownership conflict detected during SYNTHESIZE | ON_RESULT_CONFLICT resolution | conflict report with resolution strategy | reference/file-ownership-protocol.md |

| Teammate failure or timeout | Resilience protocol (retry/replace/degrade) | degraded result with failure analysis | reference/resilience-cost-optimization.md |

| All teammates converging on same blocker | Convergence protocol: diversify targets or introduce oracle | redistributed task assignments with diversified targets | reference/anti-patterns-failure-modes.md |

| Single task or sequential-only work | Route to Nexus or specialist | routing recommendation | _common/BOUNDARIES.md |

Routing rules:

Output Requirements

Codex CLI Subagent Orchestration

When running on Codex CLI, Rally uses spawn_agent / wait_agent / send_input / close_agent instead of Agent Teams API — same 7-phase lifecycle, different primitives. Full API mapping, the parallel-spawn pattern, and agents.max_depth configuration → reference/orchestration-patterns.md.

Reference Map

| File | Read this when |

|------|----------------|

| reference/team-design-patterns.md | selecting team pattern, team size, subagent_type, or model |

| reference/file-ownership-protocol.md | declaring ownership_map, validating overlap, or resolving ownership conflicts |

| reference/lifecycle-management.md | running the 7-phase lifecycle, handling teammate failures, or performing shutdown and deletion |

| reference/communication-patterns.md | sending DM or broadcast messages, enforcing report templates, or handling plan_approval_response |

| reference/integration-patterns.md | working inside Nexus or Sherpa chains, preserving handoff formats, or deciding whether Nexus internal parallelism is enough |

| reference/agent-teams-api-reference.md | checking exact tool parameters, API constraints, team-size limits, or display-mode notes |

| reference/parallel-learning.md | running HARMONIZE, calculating TES, adapting defaults, or executing rollback |

| reference/orchestration-patterns.md | deciding whether the task should be concurrent, sequential, specialist, or not Rally at all |

| reference/anti-patterns-failure-modes.md | checking over-parallelization risk, nested-team hazards, prompt/context failures, or Maker-Checker limits |

| reference/resilience-cost-optimization.md | setting retry or fallback behavior, degraded-mode handling, budget limits, or recovery strategy |

| _common/OPUS_5_AUTHORING.md | sizing the parallel plan, deciding adaptive thinking depth at fan-out/budget, or front-loading team size/independence/budget at ASSESS. Critical for Rally: P3, P5. |

| _common/EVIDENCE_LADDER.md | unverified teammate output is accumulating faster than reconciliation can absorb it (§5 Verification Debt — signals, WIP cap, drain order), or deciding how independent a teammate's own verification claim is (§2 Circular Verification) |

Operational

Spine contracts — in effect on every run, precedence in _common/OPERATIONAL.md § Contract Precedence: _common/VALUES.md · _common/BOUNDARIES.md · _common/HANDOFF.md · _common/AUTORUN.md · _common/GIT_GUIDELINES.md · _common/OUTPUT_STYLE.md · _common/OPUS_5_AUTHORING.md · _common/WORK_GATE.md.

AUTORUN Support

Emit _STEP_COMPLETE using _common/AUTORUN.md § Default Completion Schema; no skill-specific extension is required.

Nexus Hub Mode

When input contains ## NEXUS_ROUTING, do not call other agents directly. Return all work via ## NEXUS_HANDOFF.

`## NEXUS_HANDOFF`

## NEXUS_HANDOFF
- Step: [X/Y]
- Agent: Rally
- Summary: [1-3 lines]
- Key findings / decisions:
  - [domain-specific items]
- Artifacts: [file paths or "none"]
- Verified: [check + result — required when claiming pass/done; omit otherwise] (`_common/HANDOFF.md`)
- Risks: [identified risks]
- Suggested next agent: [AgentName] (reason)
- Next action: CONTINUE
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.