From harness
N-candidate parallel build with critic-selected winner. Procedure lives in orchestrator/parallel-dispatch-details.md; this file is the skill contract surface.
How this skill is triggered — by the user, by Claude, or both
Slash command
/harness:best-of-nThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Routed by `/harness:pipeline` only when `/harness:intake` set `bestofn: true` (`critical OR [best-of-n]` user override). Never user-facing; never invoked directly. Standard Build dispatches are the default — this is a Build dispatch *mode*, not a substitute for Review or Final Gate.
Routed by /harness:pipeline only when /harness:intake set bestofn: true (critical OR [best-of-n] user override). Never user-facing; never invoked directly. Standard Build dispatches are the default — this is a Build dispatch mode, not a substitute for Review or Final Gate.
$state_dir/{task-id}/plan.md with per-AC failing-test stubs.skills/best-of-n/config.json (Opus 4.7 + Sonnet 4.6 always; external slot via required_env).CLAUDE_BESTOFN_MAX_WORKTREES).See ~/.claude/orchestrator/parallel-dispatch-details.md § Best-of-N Build Team Dispatch.
$state_dir/{task-id}/best-of-n.md (frontmatter verdict, sections: Candidates Run, Winner SHA, Per-Candidate Scores, Selection Rationale, Total Cost USD via cost_estimator, Cluster Sizes — N/A until FMV is wired).$state_dir/{task-id}/scratchpad/best-of-n-selection.md (category: decision) — always carries the verbatim Selection Rationale; additionally carries a divergence record with diff-stat + Jaccard when the top two candidates clear the Step 5 tie-breaker boundary AND have changed-files Jaccard < 0.5 (mining path: observations.jsonl → /harness:learn Step 3d, never direct scratchpad → anti-pattern). Tie-breaker source + spec: see orchestrator details § Best-of-N Step 5.| Verdict | Meaning | Downstream |
|---|---|---|
BoN_WINNER_SELECTED | ≥2 candidates produced green builds; reviewer picked one. | Winner proceeds to /harness:code-review + /harness:security-review (standard Review). |
BoN_FALLBACK_TO_SINGLE | <2 valid candidates after validation/runs (e.g. external required_env unset, all but one failed own tests). Fallback is silent and logged in ## Re-routes. | Single-candidate Build dispatch on the same slice. |
BoN_INSUFFICIENT_RESOURCES | Pre-flight worktree-capacity check exceeded the cap. | Halt this dispatch; pipeline escalates to user (or falls back to single-engineer if policy permits). |
[best-of-n] user override — the 2-3x spend is not justified by baseline data.BoN_INSUFFICIENT_RESOURCES, never silently overcommit disk/inodes.BoN_FALLBACK_TO_SINGLE — every re-route must be auditable in pipeline state.skills/best-of-n/tests/ holds scoring/selection coverage (test_best_of_n.sh). Structure-drift coverage lives at scripts/test_best_of_n_skill_structure.sh, which runs the canonical-template audit against this file.
npx claudepluginhub paulingham/.claude --plugin harnessProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.