/toycrane-skills:resolve-follow-upsfrom toycrane-skills
Resolves evidence-backed docs/follow-ups/*.md by creating isolated pull requests per item. Use when project follow-ups need reproduction before editing, with one worker and branch per item.
Ships in toycrane-skills. 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.
Read when SKILL.md points to them; scripts run unread.
Turn a bounded set of recorded follow-ups into independently verified pull requests. Preserve every item that cannot pass the reproduction and authority gates.
This skill requires project-knowledge. Before doing any work, confirm it is
installed. When it is missing, stop and report it with its install command,
npx skills@latest add toy-crane/skills --skill project-knowledge, using the
project's package manager runner where it pins one.
Resolve this skill's directory, then use
scripts/resolve-follow-ups.sh from that directory. The script is the
deterministic boundary for ordering, fresh-base identity, worktree creation,
attempt suppression, and cleanup.
list --repo <root> to fetch the remote default branch and obtain every
valid candidate in discovery order plus every invalid-follow-up. Report
invalid files without filling in their missing evidence. Do not enumerate a
possibly stale coordinator checkout.identity --repo <root> --follow-up <path>. Continue until three eligible
workers have been started or the ordered backlog is exhausted.
eligible is only a snapshot, not a reservation. The platform adapter must
win the attempt's atomic claim or prepare result before launching a
worker; skipped-unchanged ... claimed <owner> [<worktree> <branch>] means
another sweep already owns the unchanged follow-up content. That active
ownership and a recorded pull request survive unrelated default-branch
advancement; terminal non-PR results become retryable after that advance.skipped-unchanged:
claimed and an owner, do not dispatch it again;
another worker already owns the exact content and base identity. If the
adapter proves that owning process has ended without a terminal result,
clean up its exact bound worktree when one is reported, then run recover --repo <root> --attempt-key <key> --owner <owner>. Never recover an active
or uncertain worker merely because its claim is old.not-reproduced, needs-shaping, or blocked result
until the follow-up content or remote default-branch SHA changes. Terminal
identity output retains owner <owner> [<worktree> <branch>]; if that
worktree still exists after its worker ended, use those exact coordinates
for cleanup before starting the base-change retry. A base advance does not
hide an outstanding terminal worktree.pull-request and a URL, check that pull request.
Keep it skipped while open. After an unmerged close, run clear for that
exact base identity before retrying. A merged pull request should remove
the follow-up on the updated default branch; report a mismatch instead of
opening a duplicate. If the path was deleted and later re-created, treat it
as a fresh follow-up lifetime even when its Markdown matches the old item.Give every worker only its follow-up path, verified base SHA, attempt identity, owner token, branch, worktree, and the worker contract below. The owner token is required when binding the checkout, recording the outcome, and cleaning up, so one worker cannot overwrite or remove another worker's attempt. The dispatcher also reserves each canonical worktree path repository-wide; never bypass a reservation failure by reusing another attempt's checkout.
Use a subagent with isolation: worktree when the active installation has a
creation-time WorktreeCreate policy or equivalent check that stops on fetch
failure and guarantees the identity base SHA. Require the subagent to compare
its HEAD with that SHA before editing.
Before dispatch, run claim --repo <root> --follow-up <path> --base-sha <sha>.
Dispatch only a claimed <attempt-key> <owner> result. As the worker's first
action, run bind --repo <root> --attempt-key <attempt-key> --owner <owner> --worktree <worktree> --branch <branch> from the native checkout. A bind
failure stops the worker before editing. Claude owns removal of a native
worktree after the coordinator records the terminal outcome.
When native creation cannot make that guarantee, run prepare to create and
verify the worktree, then start a top-level headless Claude worker from that
directory. Do not nest a Claude CLI process merely to duplicate isolation the
native subagent already guarantees.
Treat the scheduled task as coordinator only; its background worktree does not isolate item workers. For each eligible item:
prepare --repo <root> --follow-up <path> --worktree <path> --branch <branch>. Continue only for prepared <worktree> <branch> <base-sha> <attempt-key> <owner>; a concurrent sweep can instead return
skipped-unchanged without creating a checkout. The dispatcher persists the
canonical worktree target before creation, so an interrupted prepare is
reported with the same claim owner, worktree, and planned branch for exact
cleanup rather than becoming an anonymous checkout.codex exec -C <worktree> --sandbox workspace-write <prompt>. Configure only the network
and approval capabilities needed to verify, push, and open the pull request.Do not use a writing subagent that inherits the coordinator's working directory as a substitute for per-item isolation.
HEAD equals the supplied base SHA before any edit.blocked when the
base, checkout, permissions, or environment cannot be verified.not-reproduced with the attempts and next useful evidence when the
symptom does not reproduce within the bounded run. Make no speculative source
change or resolution pull request.When reproduction reveals a different out-of-scope defect, preserve the
selected item and return the new symptom, observed evidence, suspected cause,
what was tried, and proposed next step to the coordinator. Do not leave the only
record in the disposable worker. The coordinator serializes these records in
its own checkout through project-knowledge, handing it those five fields and
keeping the docs/follow-ups/<symptom>.md path it reports. Before cleaning up
the worker,
commit that record and publish a dedicated ready-for-review follow-up-record PR;
do not mix it into the selected item's resolution PR. A local coordinator change
or closing-message copy is not a durable handoff.
needs-shaping without a patch when the item requires a product
decision, public-contract change, or material trade-off. Name the unresolved
choice so a later shape-idea session can settle it.blocked.pull-request with its URL. If publication or verification fails,
retain the follow-up and return blocked rather than claiming resolution.Finish the worker response with a compact block containing outcome,
follow-up, base-sha, attempt-key, owner, pull-request when present,
the decisive reproduction or blocker evidence, and any newly discovered
follow-up record for the coordinator. The coordinator uses this block to record
the exact attempt; prose alone is not a terminal result.
After the worker returns:
mark --repo <root> --follow-up <path> --base-sha <sha> --owner <owner> --outcome pull-request --detail <URL> so later sweeps
do not duplicate it.mark command with --outcome not-reproduced, --outcome needs-shaping, or --outcome blocked and use
--detail for compact decisive evidence or the next useful condition. A
different worker cannot replace the first terminal result. The recorded
identity is disposable local automation state, not a status field in the
tracked follow-up.cleanup with
cleanup --repo <root> --worktree <worktree> --attempt-key <attempt-key> --owner <owner>. For a PR worker, run the same cleanup only after its exact
HEAD is visible on the remote branch. The script removes only the worktree
bound to that exact claim and preserves the local branch so cleanup cannot
race a new checkout and delete its ref. It revalidates the repository-wide
coordinate reservation before removal, safely deinitializes clean submodules
through isolated Git metadata without changing shared repository settings, and
leaves Git's final dirty-worktree refusal enabled. It refuses dirty,
unpublished changed, mismatched, foreign, or repository-root targets.mark, first inspect its bound branch for
publication and an existing pull request. Record a found pull request with
mark; if a branch was published without one, finish or explicitly block that
publication rather than discarding its identity. Only when no publication
occurred, use cleanup first when its recorded bound or preparing worktree
exists, then recover with the exact attempt key and owner. If preparation
stopped after persisting the target but before creating its path, skip cleanup
and recover the missing target directly; recovery removes an exact stale Git
worktree registration before releasing ownership. Recovery refuses live
worktrees, published branches, and terminal outcomes. A preparing target is
removed only when its checkout is clean and still detached at the base or its
exact prepare-owned branch can be deleted with a head compare-and-swap.Return one compact sweep report using only pull-request, not-reproduced,
needs-shaping, blocked, invalid-follow-up, and skipped-unchanged. Link
each pull request and state the evidence or next condition for every other
outcome. Never label a retained follow-up as fixed.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub toy-crane/skills --plugin toycrane-skills28 skills in this plugin
/add-env-keyGet a key the user must issue or supply, such as an API key, token, or password, into the project's .env file without the value passing through chat or the model's context. Opens the vendor's issuance page, collects the value through the secret-env mod's input pane when the session has it, and otherwise opens the file in the user's editor with the key line ready. Use when work needs such a key that the project does not have yet, or when the user asks to add, set, or put an API key or token into .env./add-stack-contextAudit and establish current agent context for the technologies that define a project's stack. Use when setting up a project for agent work, after selecting or adding a framework, library, developer tool, or hosted service, or when entering an existing project whose agent context has not been audited./audit-evalsAudit a project's LLM eval regression suite from its committed cell history, report cells whose most recent 10 trials all passed, checks with identical recent histories, cells that flip after graduating, and cells that always fail, then propose demoting the recently always-passing cells to the lower tier and apply only the demotions the user approves. Use when the user asks which eval cells still earn their run, why a regression run costs so much, or to slim, prune, or demote a regression suite./babysit-prWatch one open GitHub pull request through CI and review bots until it is ready to merge or needs a person, fixing confirmed findings and failing checks, answering and resolving review threads, and rerunning infrastructure flakes. Use when a pull request has just been opened or updated and its checks, bot review comments, or merge conflicts need answering, or when asked to babysit, watch, shepherd, or get a PR green or ready. Does not merge; `merge` and `implement` invoke it before merging or handing off./babysit-specsRevise active `docs/specs/SLUG/` specs so they match what has shipped since they were written. Use when earlier work has landed and queued specs may now rest on stale assumptions, acceptance criteria, constraints, terms, or prototypes, or when implementation reports a spec as stale before changing source. Takes one or more spec folders, or every folder under `docs/specs/` when none is named. Do not use to shape a new spec from a problem and direction, which belongs to `shape-idea`, or to reconcile durable project context and retire shipped folders, which belongs to `maintain-project-context`./build-prototypeBuild a complete dummy-data HTML prototype or a temporary comparison of up to three alternatives for a specific user situation. Use to settle a screen-based product before implementation or resolve a visual or interaction decision during shaping or prototype review. Do not use for production implementation or CLI, terminal, or voice interfaces.