execution-grounded-selection

$npx mdskill add Tibsfox/gsd-skill-creator/execution-grounded-selection

Selects best candidate by running them on diverse inputs and clustering behaviors.

  • Disambiguates multiple plausible outputs from code generation or planning tasks.
  • Depends on an executor to run candidates on diverse inputs.
  • Clusters candidates by behavioral fingerprint from execution traces.
  • Returns the candidate from the largest behavioral cluster.

SKILL.md

.github/skills/execution-grounded-selectionView on GitHub ↗
---
name: execution-grounded-selection
description: >
  Pick among candidate outputs (code, configs, plans) by running them on
  diverse inputs and clustering by behavioural fingerprint, rather than
  by textual aggregation or log-probability. Activates when an executor
  returns multiple plausible candidates that need disambiguation, when
  output-majority voting would be the default choice, or when reviewing
  generated code that has not yet been validated. The 2026 evidence
  (Semantic Voting, arxiv 2605.08680v1) is that any execution-based
  selector dominates output-majority voting by 19-52pp; sketch-generated
  inputs beat random fuzz by 11.3pp. Triggers: "pick the best candidate",
  "majority vote on code", "select from N samples", "validate the
  generated output", "behavioural verification".
user-invocable: true
version: 1.0.0
format: 2025-10-02
triggers:
  - "pick the best candidate"
  - "majority vote on code"
  - "select from N samples"
  - "validate the generated output"
  - "behavioural verification of code"
updated: 2026-05-16
status: ACTIVE
source: arxiv 2605.08680v1 (Semantic Voting), 2605.07248v1 (Plan-on-Trigger)
---

# Execution-Grounded Selection

## Why

Output-majority voting (pick the most common string output) is dominated by *any* selector that actually runs the candidates. Semantic Voting (arxiv 2605.08680v1) shows 19-52pp improvement over output voting across multiple code benchmarks. The specific aggregation rule (majority, weighted, MBR-Exec) is statistically indistinguishable once execution evidence is present — *execution is the dominant signal, aggregation is the residual*.

This is the code-domain analogue of the **noise-as-exploration** Rosetta concept: execution diversity is the exploration mechanism; behavioural fingerprint is the equilibrium signal.

## How

The Semantic Voting pipeline:

1. **Sample N candidates** — generate at temperature > 0 (typical N = 5-10).
2. **Generate diverse inputs** — sketch-generated inputs (derived from candidate population structure) beat random fuzz by ~11pp. If sketch generation is infeasible, fall back to LLM-generated test inputs > random fuzz.
3. **Execute each candidate on each input** — collect (candidate_i, input_j, output_ij) tuples. Crash counts as a distinct fingerprint, not a discard.
4. **Cluster by fingerprint** — equivalence on `[output_ij for j in inputs]` defines the cluster.
5. **Pick the largest cluster** — break ties by candidate self-confidence or by Pareto on execution cost.

## When to skip

- Generation is deterministic (temperature = 0) — there's nothing to select among.
- Execution is expensive or has side effects (touches the network, modifies state) — fall back to dry-run / static analysis.
- The output isn't executable (e.g., natural-language summary) — use paired-trace audit instead.

## Integration

- `wrap:verify` and `gsd-verify-work` — pre-merge gate when verification produces multiple candidate fixes.
- `gsd-code-fixer` — when the fixer proposes more than one fix per finding.
- `code-review` — adds a "did you actually run it?" subsection to the review rubric.

## Cross-references

- Rosetta concept #9 (Execution-Grounded Selection) — canonical definition
- College: `agent-systems / agentic-code-generation / agent-execution-grounded-selection`
- Related skills: `test-generator` (generates the inputs; pair with this skill for the full loop)

More from Tibsfox/gsd-skill-creator

SkillDescription
3d-interaction-designDesign heuristics for three-dimensional interaction — input modalities (6DoF controllers, gaze, gesture, voice), selection and manipulation techniques (ray-cast, virtual hand, go-go, world-in-miniature), navigation (teleport, continuous, redirected walking), and feedback loops (haptic, audio, visual). Covers Fitts' law in 3D, discoverability vs affordance, safe-zone design, and comfort/simulator sickness mitigation. Use when designing VR/AR interactions, immersive walkthroughs, or any input system where the user's body is the controller.
accessibility-patternsProvides web accessibility best practices for semantic HTML, ARIA, keyboard navigation, color contrast, and screen reader patterns. Use when building UI components, reviewing accessibility, or when user mentions 'a11y', 'accessibility', 'ARIA', 'screen reader', 'keyboard navigation', 'WCAG'.
active-listeningActive listening techniques for effective communication. Covers attending behaviors, paraphrasing, reflective listening, clarifying questions, empathic response, barriers to listening, listening in conflict, and cross-cultural listening. Use when building listening skills, improving understanding in conversation, mediating disputes, or analyzing communication breakdowns.
adversarial-pr-reviewAdversarial spec-compliance PR review — cross-references diffs against approved specs, verifies runtime claims against source, detects competing PRs, audits scope/convention compliance. Use before merging.
agile-methodsAgile and Lean software development methodologies for iterative, adaptive project execution. Covers Scrum (roles, ceremonies, artifacts), Kanban (WIP limits, flow metrics), XP (TDD, pair programming, CI), SAFe overview, Lean Software Development (Poppendieck's 7 principles), user stories (INVEST criteria), estimation via story points and velocity, and the Agile Manifesto's values and principles. Includes Cynefin framework for methodology selection and GSD's relationship to Agile as a structured Lean variant.
algebraic-reasoningSymbolic manipulation, equation solving, and algebraic structures for mathematical reasoning. Covers distributive law, factoring, completing the square, linear through polynomial equation solving, systems of equations (substitution, elimination, Gaussian elimination, matrix methods), algebraic structures (groups, rings, fields), modular arithmetic, polynomial theory, and inequalities. Use when solving equations, simplifying expressions, working with algebraic structures, or performing symbolic manipulation.
algorithmic-awarenessUnderstanding how algorithmic systems shape what users see, know, and do -- from recommendation feeds to search ranking to credit scoring to hiring software. Covers the mechanics of recommendation systems, algorithmic bias and its sources, personalization's effects on information diets, opacity and accountability, AI limitations (hallucination, confident wrongness), and the human-in-the-loop question. Use when a learner needs to think critically about why particular content reached them.
algorithms-data-structuresAlgorithms and data structures from first principles through advanced analysis. Covers sorting (bubble, insertion, selection, merge, quick, heap, radix), searching (linear, binary, BFS, DFS, Dijkstra, A*), fundamental data structures (arrays, linked lists, stacks, queues, hash tables, trees, heaps, graphs, tries), complexity analysis (Big-O, Big-Omega, Big-Theta, amortized), recurrence relations, and algorithm design paradigms (divide-and-conquer, greedy, dynamic programming, backtracking). Use when analyzing, selecting, implementing, or comparing algorithms and data structures.
aminet-browserAminet search and browse: full-text search, category tree navigation, architecture filtering, package detail, and curated collections. Use when searching, browsing, or managing package collections.
aminet-emulatorFS-UAE emulator configuration and launch: hardware profiles, ROM management, WHDLoad integration, config generation, and state snapshots. Use when configuring emulation, managing ROMs, or launching Amiga software.