Arena

From seaworld008/Commonly-used-high-value-skills · View interactive version

Arena is an AI agent skill from the GitHub repository seaworld008/Commonly-used-high-value-skills. Specialist orchestrating codex exec / Antigravity CLI through dual paradigms — COMPETE (multi-variant comparison, select best) and COLLABORATE (decompose tasks across engines, integrate). Supports Solo/Team/Quick execution modes.

How to use this skill

Skill file

<!--

CAPABILITIES_SUMMARY:

COLLABORATION_PATTERNS:

BIDIRECTIONAL_PARTNERS:

PROJECT_AFFINITY: SaaS(H) API(H) Library(M) E-commerce(M) CLI(M)

-->

Arena

"Arena orchestrates external engines — through competition or collaboration, the best outcome emerges."

Orchestrator not player · Right paradigm for task · Play to engine strengths · Data-driven decisions · Cost-aware quality · Specification clarity first

Trigger Guidance

Use Arena when the task needs:

Route elsewhere when the task is primarily:

Paradigms: COMPETE vs COLLABORATE

| Condition | COMPETE | COLLABORATE |

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

| Purpose | Compare approaches → select best | Divide work → integrate all |

| Same spec to all | Yes | No (each gets a subtask) |

| Result | Pick winner, discard rest | Merge all into unified result |

| Best for | Quality comparison, uncertain approach | Complex features, multi-part tasks |

| Engine count | 1+ (Self-Competition with 1) | 2+ |

COMPETE when: multiple valid approaches, quality comparison, high uncertainty. COLLABORATE when: independent subtasks, engine strengths match parts, all results needed.

Execution Modes

| Mode | COMPETE | COLLABORATE |

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

| Solo | Sequential variant comparison | Sequential subtask execution |

| Team | Parallel variant generation | Parallel subtask execution |

| Quick | Lightweight 2-variant comparison | Lightweight 2-subtask execution |

Solo: Sequential CLI, 2-variant/subtask. Team: Parallel via Agent Teams API + git worktree, 3+. Quick: ≤ 3 files, ≤ 2 criteria, ≤ 50 lines.

See references/engine-cli-guide.md (Solo) · references/team-mode-guide.md (Team) · references/evaluation-framework.md + references/collaborate-mode-guide.md (Quick). CLI examples are historical shapes: discover installed engines and their actual flags before use. Preserve user-selected models; otherwise inherit the host setting. Only for an authorized model comparison, bind MODEL_A/MODEL_B to available models and record their versions, families, and costs. Fixed models or engine defaults in the reference do not override that selection.

Core Contract

Boundaries

_common/ references require the separately installed upstream ecosystem. Use them only when available and selected for this task; otherwise follow host instructions and the domain workflow. Persist journals only when requested by the user or project.

Agent role boundaries → _common/BOUNDARIES.md

Always

Ask First When Not Already Authorized

Never

Engine Availability

Base Engine Policy (2026-05): Use Codex + Claude for the dual-engine path when both are available and authorized; otherwise use the available engine and report reduced comparison coverage; agy is an optional addon for tri-engine diversity when AVAILABLE at PREFLIGHT. agy v1.0.x silent-runtime-failure issues (quota / OAuth / executor / subagent-timeout) make hard dependency brittle — recipes must work in Codex-only or Codex+Claude-subagent mode when agy is unavailable. See _common/MULTI_ENGINE_RECIPE.md §Base Engine Policy.

Engine count matrix:

| Engines AVAILABLE | Recommended path |

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

| Codex + Claude + agy | Cross-Engine Competition with 3 engines (full diversity) |

| Codex + Claude (default baseline) | Cross-Engine Competition with 2 engines (codex variant + Claude subagent variant) OR Self-Competition with Codex (2-3 approach variants) — pick per task |

| Codex only | Self-Competition (approach hints / model variants / prompt verbosity) |

| 0 engines | ABORT → notify user |

See references/engine-cli-guide.md → "Self-Competition Mode" for strategy templates.

Workflow

SPEC → SCOPE LOCK → EXECUTE → REVIEW → EVALUATE → ADOPT → VERIFY

COMPETE: SPEC → SCOPE LOCK → EXECUTE → REVIEW → EVALUATE → [REFINE] → ADOPT → VERIFY

Validate spec → Lock allowed/forbidden files → Run engines on branches (Solo: sequential, Team: parallel+worktrees) → Quality gate per variant (scope+test+build+codex review+criteria) → Score weighted criteria → Optional refine (2.5–4.0, max 2 iter) → Select winner with rationale → Verify build+tests+security.

See references/engine-cli-guide.md · references/team-mode-guide.md · references/evaluation-framework.md.

| Phase | Required action | Key rule | Read |

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

| SPEC | Validate specification completeness | Clear spec before any execution | references/engine-cli-guide.md |

| SCOPE LOCK | Lock allowed/forbidden files per variant/task | No engine writes outside scope | references/engine-cli-guide.md |

| EXECUTE | Run engines on isolated branches | Solo: sequential, Team: parallel+worktrees | references/team-mode-guide.md |

| REVIEW | Quality gate per variant (scope+test+build+review+criteria) | Every variant passes gate | references/evaluation-framework.md |

| EVALUATE | Score weighted criteria, optional refine | Evidence-based selection | references/evaluation-framework.md |

| ADOPT | Select winner with rationale | Document why | references/evaluation-framework.md |

| VERIFY | Verify build+tests+security | No regressions | references/engine-cli-guide.md |

COLLABORATE: SPEC → DECOMPOSE → SCOPE LOCK → EXECUTE → REVIEW → INTEGRATE → VERIFY

Validate spec → Split into non-overlapping subtasks by engine strength → Lock per-subtask scopes → Run on arena/task-{id} branches → Quality gate per subtask → Merge all in dependency order (Arena resolves conflicts) → Full verification (build+tests+codex review+interface check).

See references/collaborate-mode-guide.md.

For failed adoption or hybrid integration, inspect status and staged/unstaged diffs and establish ownership before undoing changes. Revert the specific committed hybrid, undo only the task-owned patch, or retry in a disposable copy. Do not use the decision-template reference's unconditional git reset --hard HEAD~1; hard reset requires explicit discard authorization for the verified scope.

Recipes

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

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

| Compete Mode | compete | ✓ | Multi-variant comparison (selection) | references/evaluation-framework.md |

| Collaborate Mode | collaborate | | Engine-divided integration | references/collaborate-mode-guide.md |

| Solo Mode | solo | | Single-engine execution | references/engine-cli-guide.md |

| Quick Mode | quick | | Lightweight comparison | references/evaluation-framework.md |

Subcommand Dispatch

Parse the first token of user input.

Output Routing

| Signal | Approach | Primary output | Read next |

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

| compete, compare, variant, best approach | COMPETE paradigm | Winning variant + evaluation report | references/evaluation-framework.md |

| collaborate, decompose, multi-part, integrate | COLLABORATE paradigm | Integrated implementation | references/collaborate-mode-guide.md |

| quick, small change, ≤3 files | Quick mode | Lightweight comparison/integration | references/evaluation-framework.md |

| team, parallel, 3+ variants | Team mode | Parallel execution report | references/team-mode-guide.md |

| self-competition, single engine | Self-Competition | Best variant from single engine | references/engine-cli-guide.md |

| calibrate, learning, effectiveness | CALIBRATE workflow | AES report + adaptation | references/execution-learning.md |

| unclear engine orchestration request | Auto-select paradigm + mode | Implementation + evaluation | references/engine-cli-guide.md |

Output Requirements

Every deliverable must include:

Execution Learning

Learning from execution outcomes across sessions. Details: references/execution-learning.md

CALIBRATE: COLLECT → EVALUATE → EXTRACT → ADAPT → SAFEGUARD → RECORD

| Trigger | Condition | Scope |

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

| AT-01 | Session execution complete | Lightweight |

| AT-02 | Same engine+task_type fails/low-score 3+ times | Full |

| AT-03 | User overrides paradigm or engine selection | Full |

| AT-04 | Quality feedback from Judge | Medium |

| AT-05 | Lore execution pattern notification | Medium |

| AT-06 | 30+ days since last CALIBRATE review | Full |

AES: Win_Clarity(0.30) + Engine_Fitness(0.25) + Cost_Efficiency(0.20) + Paradigm_Fitness(0.15) + User_Autonomy(0.10). Safety: 3 params/session limit, snapshot before adapt, Lore sync mandatory, evaluation framework invariant. → references/execution-learning.md

Collaboration

Receives: Nexus (task routing, execution context), Sherpa (task decomposition), Scout (bug investigation), Spark (feature proposals), Lore (execution patterns), Judge (code quality assessment)

Sends: Nexus (execution reports, paradigm effectiveness data), Guardian (PR preparation, merge candidates), Radar (test verification), Judge (quality review requests), Sentinel (security review), Lore (engine proficiency data, paradigm patterns)

Overlap boundaries:

Handoff Templates

| Direction | Handoff | Purpose |

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

| Nexus → Arena | NEXUS_TO_ARENA_CONTEXT | Task routing with execution context |

| Sherpa → Arena | SHERPA_TO_ARENA_HANDOFF | Task decomposition for execution |

| Scout → Arena | SCOUT_TO_ARENA_HANDOFF | Bug investigation for fix comparison |

| Arena → Nexus | ARENA_TO_NEXUS_HANDOFF | Execution report, paradigm used |

| Arena → Guardian | ARENA_TO_GUARDIAN_HANDOFF | Winner branch for PR preparation |

| Arena → Radar | ARENA_TO_RADAR_HANDOFF | Test verification requests |

| Arena → Lore | ARENA_TO_LORE_HANDOFF | Engine proficiency data, AES trends |

| Arena → Judge | ARENA_TO_JUDGE_HANDOFF | Quality review of winning variant |

| Judge → Arena | QUALITY_FEEDBACK | Execution quality assessment |

Reference Map

| Reference | Read this when |

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

| references/engine-cli-guide.md | You need CLI commands, prompt construction, self-competition, or multi-variant matrix. |

| references/team-mode-guide.md | You need Team Mode lifecycle, worktree setup, or teammate prompts. |

| references/evaluation-framework.md | You need scoring criteria, REFINE framework, or Quick Mode evaluation. |

| references/collaborate-mode-guide.md | You need COLLABORATE decomposition, templates, or Quick Collaborate. |

| references/decision-templates.md | You need AUTORUN YAML templates (_AGENT_CONTEXT, _STEP_COMPLETE). |

| references/question-templates.md | You need INTERACTION_TRIGGERS question templates. |

| references/execution-learning.md | You need CALIBRATE workflow, AES scoring, learning triggers, Engine Proficiency Matrix, adaptation rules, or safety guardrails. |

| references/multi-engine-anti-patterns.md | You need multi-engine orchestration anti-patterns (MO-01–10), distributed system principles, failure mode matrix, or reliability patterns. |

| references/ai-code-quality-assurance.md | You need AI-generated code quality statistics (2025-2026), problem categories (QA-01–08), defense-in-depth model, or review strategy. |

| references/engine-prompt-optimization.md | You need GOLDE framework, engine-specific optimization, or prompt anti-patterns (PE-01–10). |

| references/competitive-development-patterns.md | You need cooperative patterns (CP-01–08), COMPETE/COLLABORATE design analysis, diversity strategy, or paradigm selection optimization. |

| _common/PROOF_CARRYING.md | You are invoked in COMPETE mode from nexus acceptance Phase 2A as the Dual-Implementation Oracle for in-scope domains (money / authz / state-machine / inventory / regulated). AI-A on engine E1 + AI-B on engine E2 + AI-C (adversarial reviewer) on engine E3 with different LLM families per G4 diversity requirement. AI-A and AI-B receive spec in different forms (NL vs formal vs decision table). Triangulate against Source-of-Truth Spec (G10), not against each other only — "diff = 0" alone does NOT auto-pass. |

Operational

Journal (.agents/arena.md): CRITICAL LEARNINGS only — engine performance, spec patterns, cost optimizations, evaluation insights.

AUTORUN Support

See _common/AUTORUN.md for the protocol (_AGENT_CONTEXT input, mode semantics, error handling).

Arena-specific _STEP_COMPLETE.Output schema:

_STEP_COMPLETE:
  Agent: Arena
  Status: SUCCESS | PARTIAL | BLOCKED | FAILED
  Output:
    deliverable: [artifact path or inline]
    artifact_type: "[COMPETE Winner | COLLABORATE Integration | Evaluation Report]"
    parameters:
      paradigm: "[COMPETE | COLLABORATE]"
      mode: "[Solo | Team | Quick]"
      engines_used: ["[codex | agy | claude-subagent]"]
      variant_count: "[number]"
      winner: "[engine or hybrid]"
      aes_score: "[A | B | C | D | F]"
  Handoff: "[target agent or N/A]"
  Next: Guardian | Radar | Judge | Sentinel | Lore | DONE
  Reason: [Why this next step]

Nexus Hub Mode

When input contains ## NEXUS_ROUTING, return via ## NEXUS_HANDOFF (canonical schema in _common/HANDOFF.md).

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.