mcpField
A
arena

arena

github.com/yeachan-heo其他40.7k7 次安装今天更新
代码仓库

关于 arena

针对同一份需求并行运行 N 个候选方案并综合结果:先制定评估标准,隔离并行分支,使用不同模型进行交叉评审,逐项按标准选出方案,并手动移植优点。当单次尝试可能导致方案方向错误时使用。

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/yeachan-heo/oh-my-claudecode --skill arena

安装后在 Claude Code 中输入/arena确认已加载。

README 原文English

来自项目 README

README 暂无中文译文,以下为英文原文;中文介绍见上方。

Arena

N parallel candidates attack the same brief; the best artifact is picked criterion by criterion and strengthened by grafting. Diversity of candidates is the mechanism: agreement across independent attempts is high-signal, and divergence exposes what the brief under-specified.

When to use

  • a design or implementation has more than one defensible shape, and the first attempt would lock in the wrong one
  • judgment-sensitive work: a migration strategy, an API surface, a data structure choice, a subtle algorithm
  • the user asks for a bakeoff, a comparison of approaches, or "try a few ways and pick"

When not to use

  • mechanical edits, contained one-file changes, or work with an obvious single answer — run execute instead
  • research questions whose deliverable is an answer, not an artifact — run research

Phase A — Frame

Every candidate gets the same brief, so the brief is the contract.

  1. State the artifact each candidate produces.
  2. Derive the rubric: 3-6 concrete, gradeable criteria for this task. The rubric is the picker's tool in Phase D; candidates never see it.
  3. Pick the runtime:
    • In-session: parallel Task dispatches to oh-my-claudecode:executor, one per candidate, each given its own output location.
    • Multi-provider: seat candidates for model diversity — read team.roleRouting from the project config (.claude/omc.jsonc) or the user config (claude-omc/config.jsonc; omc config prints the effective values), collect up to three distinct provider families in canonical role order, and fill remaining seats from the default families — claude, codex, gemini — not already seated; with no routing config, use OMC_TEAM_WORKTREE_MODE=detached omc team --no-decompose 1:claude,1:codex,1:gemini "<brief>". Worktree isolation must be on — an unset mode resolves to disabled and all candidates would share one checkout — and --no-decompose keeps every candidate on the same brief instead of splitting a multi-point brief across workers (one writer per worktree). Use diverse models when the work is judgment-sensitive; the same model N times when it is generation-bound.
  4. Give each candidate an exclusive output location — a git worktree when possible, otherwise a scratch directory. Candidates must not share writable state. After starting a multi-provider team, wait for every worker to reach a terminal state and collect its artifact. Keep the worktrees alive through judging and grafting; run team shutdown/cleanup only in the final cleanup step after verification.

Phase B — Fan out

Spawn all candidates in one message, in the background, each with the brief, its output location, and instructions to return the artifact plus a short rationale naming the alternatives it considered and rejected. If a candidate produces nothing, proceed with N-1 and note the dropout. Keep at least two candidates: when dropouts leave fewer, spawn replacements — each on a remaining candidate's model, or on the parent's model when none remain — until two produce artifacts, and say so.

Phase C — Cross-judge

After all candidates finish, spawn one read-only judge on a model from a provider family none of the candidates ran on. If that dispatch is rejected, fall back down the remaining cross-family models; when no cross-family dispatch runs, skip the judge, pick the base alone in Phase D, and say so. If you cannot tell which family the candidates ran on, try the models you would have picked and name in the verdict that the family check did not run. The judge sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs while you read.

Phase D — Pick

Read every candidate end to end. Score each against the rubric criterion by criterion, not on holistic feel, and compare with the cross-judge when Phase C ran one. Agreement on the base confirms the pick; disagreement means one of you is biased or the rubric is ambiguous — read both rationales before deciding. Tie-break toward the smaller API and the cleaner boundary (minimal-code-discipline).

Phase E — Graft

Walk each losing candidate once more for what is worth porting — usually one or two things, not most of it. Fold grafts in by hand so the result stays coherent under one mental model. Candidates that converge on one shape are strong agreement: note it and ship the consensus shape. Candidates that wildly diverge mean Phase A was under-specified: reframe and rerun rather than averaging the divergence.

Phase F — Verify

Verify the synthesized artifact under the verify skill protocol — real command output, fresh evidence. A problem the arena missed means either the rubric was wrong (reframe and rerun) or a graft was missed (back to Phase E). Do not paper over it.

Rules

  • Never a default gate: arena runs only when explicitly invoked.
  • The lead session owns the result; candidate and judge outputs are inputs, not verdicts.
  • A later review judges the synthesized artifact, not the candidates.

评论

支持 Markdown