Skip to content

wandb/senpai / plugins/senpai/skills/review-experiment

review-experiment

Verified

Review one terminal experiment and choose the next step: merge a reproducible winner, close a useful negative or dead end, or request missing evidence.

Review an experiment

Use get_prs for the complete discussion and the current base and head SHAs. For code review, call get_pr_source with number, expected_base_sha, and expected_head_sha. Its first response lists changed paths. Call it again with up to eight selected paths, then read the returned artifact. It contains complete text diffs and source at the comparison merge base and head. This also works for merged PRs and private repositories; no shell credential is needed. Pass the artifact to a review subagent when appropriate. If either PR SHA changes, refresh the discussion and source before deciding. This read tool does not authorize merging an operator PR through a student-assignment workflow.

Retrieve the complete PR with get_prs. Verify its assignment, current head SHA, terminal structured result, W&B evidence, metric direction, and scientific conclusion. Then choose the appropriate next step:

  • merge a reproducible improvement;
  • close a completed control, clean negative, invalid candidate, or bounded dead end with a clear reason; or
  • request a revision when the evidence is incomplete or another bounded run is required.

Merge a winner

{
  "assignment": {
    "pr_number": 123,
    "assignment_id": "assignment-id",
    "revision_id": "current-revision-id",
    "expected_pr_head_sha": "CURRENT_PR_HEAD_SHA"
  },
  "expected_current_base_sha": "CURRENT_BASE_SHA",
  "merge_method": "squash"
}

Call merge_experiment. It immediately returns a delegated task ID. Continue other work while the worker reviews and merges this exact PR with fresh context from the PR discussion and target program. It uses the configured smart model and reasoning effort for a fresh code quality review. Unnecessary code, unrelated docs, and other scope problems block merging; docs, tests, and complexity justified by the task remain valid. Each finding names the file it concerns, and a review reports every blocking finding at once so that one revision can resolve them all. The worker posts blocking findings to the current PR and sends you its outcome through a completion event. Use agent_status or cancel_agents with the task ID when needed. Do not treat a queued task as a completed merge.

The worker refuses drafts, missing or foreign results, stale heads, blocking labels, unknown mergeability, and conflicts. It rechecks the PR and evidence after review, and compares the live base SHA immediately before merging. If the research base changed, reassess the exact terminal result against the event's current_base_sha.

If the conclusion still holds, record that decision before merging:

{
  "assignment": {
    "pr_number": 123,
    "assignment_id": "assignment-id",
    "revision_id": "current-revision-id",
    "expected_pr_head_sha": "CURRENT_PR_HEAD_SHA"
  },
  "expected_current_base_sha": "CURRENT_BASE_SHA",
  "reason": "Why this exact result remains valid against the current research base."
}

Call accept_result_on_current_base with that payload. Its durable acceptance is bound to the assignment, revision, result head, canonical structured result, and exact current base SHA. If any of them changes, reassess. If the conclusion no longer holds, request a new revision instead. Never invent a SHA or call gh pr merge.

Close a completed non-winner

{
  "assignment": {
    "pr_number": 123,
    "assignment_id": "assignment-id",
    "revision_id": "current-revision-id",
    "expected_pr_head_sha": "CURRENT_PR_HEAD_SHA"
  },
  "reason": "Concise scientific reason for closing this experiment."
}

Call close_experiment. Distinguish a useful negative from an invalid or incomplete run. Do not edit labels, write protocol markers, or close the PR with gh.

Request a revision

{
  "assignment": {
    "pr_number": 123,
    "assignment_id": "assignment-id",
    "revision_id": "current-revision-id",
    "expected_pr_head_sha": "CURRENT_PR_HEAD_SHA"
  },
  "new_revision_id": "new-revision-id",
  "required_base_sha": "ASSIGNED_OR_LIVE_BASE_SHA",
  "comment": "Exact missing evidence and the bounded next run required."
}

Call request_assignment_revision. Use a new stable revision ID and the exact research base SHA the next revision must use. State one concrete change or experiment and its acceptance evidence; do not close an experiment that can still answer the assigned question with one bounded correction.

Pass the assignment's recorded base_sha when the revision must preserve the tested source, including after the advisor publishes research notes. Select the exact live base SHA only when the student must incorporate that base before running. Other SHAs are rejected. Prose cannot override the recorded base: every submitted result must contain that exact commit. A result on the retained base still needs accept_result_on_current_base before merging onto a changed live base.

Record the outcome

Update the baseline or research log in the format prescribed by program.md, including the PR, metrics, run IDs and links, reproduction command, and conclusion. Commit that advisor-owned change and publish it only through:

{
  "remote_branch_sha_before_push": "REMOTE_SHA_BEFORE_PUSH",
  "local_commit_sha": "LOCAL_COMMIT_SHA"
}

Call publish_advisor_branch; it publishes only the configured advisor branch.

Review multiple candidates strongest-first and refresh the baseline between each decision.

receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall