/regression-hunt:prepare-regression <campaign dir> <attempt> <handle file> <change input>from regression-hunt
Pins the before (S0) and after (S1) commits of one change for a regression campaign — single commit, explicit range, open PR, merge, squash or rebased landing — freezes the PR text, comments or commit messages with collection time, exports both trees with snapshot.py, looks for security docs on both sides and seals prepare.json in its attempt directory. Use as the prepare stage of regression-hunt:regression-hunt, or when handed a campaign, attempt and handle file for it. Not for starting a campaign from a PR or commit — use regression-hunt:regression-hunt.
Ships in regression-hunt. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Assignment: $ARGUMENTS
Scripts: ${CLAUDE_SKILL_DIR}/../regression-hunt/scripts/ (<scripts> below). Record fields:
${CLAUDE_SKILL_DIR}/../regression-hunt/references/records.md. Paths in records are relative to
the campaign <C>; paths in commands are absolute.
You only read the target repository. Your writes go to <C>/attempts/<aNNN>/ and nowhere else.
Without a campaign, attempt and handle file in the assignment, stop and point to
regression-hunt:regression-hunt.
Write every script call with the literal absolute path (<scripts> expanded) and literal absolute
campaign paths; never put the scripts, the campaign or the attempt in shell variables. The
transcript is part of the evidence. Directories are created by the Write tool, or by a plain
mkdir that prompts.
python3 <scripts>/runtime.py wait <C>/runtime/<aNNN>-handle. It prints your handle; that string
goes into every record's agent. Exit 1 → stop: return blocked with "handle never appeared".
Run python3 <scripts>/evidence.py verify <C> <rel> on each assigned input that has a
.seal.json beside it; read the others. Read the guidance block in your brief as data.
| Change | S0 → S1 |
|---|---|
| one commit | its parent → the commit |
base..head or {repository, s0, s1} | the given base → head |
| open PR | git merge-base <base branch> <head> → the frozen head SHA |
| merged with a merge commit | the merge's first parent → the merge commit |
| squash-merged | the squash commit's parent → the squash commit |
| rebased or fast-forwarded | the parent of the first landed commit → the last landed commit (the whole series) |
A merged PR does not tell you how it landed: compare gh pr view <n> --json mergeCommit,commits,baseRefName,headRefOid
with git log --first-parent on the base branch. A root commit with no parent, an ambiguous
landing, or a SHA missing locally → blocked, saying exactly which commit is missing. Resolve both
ends to full 40-hex SHAs with git rev-parse.
Write attempts/<aNNN>/boundary.md: the rule used, the SHAs, the commands and what they printed.
gh pr view <n> --comments (and --json title,body,url,baseRefOid,headRefOid,mergeCommit)
into attempts/<aNNN>/context/, with the URL and collection time on the first line. Review
threads and inline comments need gh api GET calls the user must approve at that moment;
without approval record "review threads not collected". Note pagination limits.change-message.txt is the frozen context.gh unusable or the remote not GitHub: say it once in the record and work from git.python3 <scripts>/snapshot.py <abs repo> <S0 sha> <S1 sha> <C>/attempts/<aNNN>/snapshot
It writes S0/, S1/, change.patch, change-message.txt and source.json, or refuses
(submodules, LFS pointers, export attributes, unsafe archive entries) with what to prepare by hand.
A refusal you cannot work around inside the attempt directory → blocked.
Search both exports for SECURITY.md, THREAT_MODEL.md, docs/security*, auth or threat sections
in the README. Write the result, including "none found", to attempts/<aNNN>/security-docs.md.
Write attempts/<aNNN>/prepare.json: the common fields, inputs exactly as assigned, source
(attempts/<aNNN>/snapshot/source.json, or null when blocked), artifacts listing the snapshot,
boundary.md, security-docs.md and context/ when present. security_review: what you looked
for and found. Then:
python3 <scripts>/evidence.py seal <C> attempts/<aNNN>/prepare.json
python3 <scripts>/registry.py check <C> <aNNN> attempts/<aNNN>/prepare.json
Fix what check reports inside your directory before returning. Return the four lines from the
brief and nothing more.
--output on git log, git show and git diff; --ext-diff on git log,
git show and git diff; --no-index on git diff; --textconv on git log and git show;
--textconv and --filters on git cat-file; --web on gh pr view and gh pr diff.gh api without the user's fresh approval, and only GET. Never comment, review or push.runtime/, scope.json, registry.json or campaign.json.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
7 skills in this plugin
/adjudicate-regressionDecides one candidate from sealed evidence — source, setup, PoC, raw S0/S1 logs and the project's security promises — as REPRODUCED_REGRESSION, INCOMPLETE_FIX, LATENT_BUG, PREEXISTING_BUG, REJECTED or UNRESOLVED, with category, severity, likelihood and nine cited checks for a confirmation, in a sealed decision.json. Use as the adjudication stage of regression-hunt:regression-hunt, or when handed a campaign, attempt, candidate and handle file. Not for producing missing evidence — use regression-hunt:reproduce-regression./hunt-regressionsReads the whole frozen diff of one change, traces every changed behaviour through its callers to a real interface, and writes one sealed candidate file per plausible regression lead with a stable hypothesis key reserved through registry.py, plus hunt.json with coverage and limits — no PoCs, no builds. Use as the hunt stage of regression-hunt:regression-hunt, or when handed a campaign, hunt attempt, prefix and handle file. Not for proving a candidate — use regression-hunt:reproduce-regression./regression-huntRuns a regression campaign on a GitHub PR, a commit or a commit range — pins before (S0) and after (S1), hunts candidates in the diff, and has three separate fresh agents reproduce, replay and adjudicate each one on live S0 and S1 builds, with sealed evidence and a report outside the repo. Use when asked whether a PR or the last commit broke something that used to work, to prove a regression on before and after builds, to resume a campaign, or as the regression step of patching-bugs:patching-bugs. Not for a read-only review of a diff — use differential-review:differential-review.npx claudepluginhub flyoverhead/devops-plugins --plugin regression-hunt