From stacked-delivery
Manages stacked diffs as a dependency graph: restacks after ancestor updates, verifies per-node CI proof, and lands bottom-up or via forge-native atomic prefix. Use when PRs or branches form a dependency stack.
How this skill is triggered — by the user, by Claude, or both
Slash command
/stacked-delivery:stacked-change-deliveryThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Treat a stack as a versioned dependency graph, not a list of branch names.
Treat a stack as a versioned dependency graph, not a list of branch names. Repository policy and the user's mutation scope remain authoritative.
Bundled commands use $PLUGIN_ROOT ($env:PLUGIN_ROOT in PowerShell; use the
same path suffix). Set it once: use the host's plugin-root variable when
defined (Claude Code: PLUGIN_ROOT="$CLAUDE_PLUGIN_ROOT"), otherwise the
absolute path of this plugin's root directory.
Load only the reference needed:
$PLUGIN_ROOT/skills/stacked-change-delivery/references/stack-snapshot-contract.md$PLUGIN_ROOT/skills/stacked-change-delivery/references/proof-drift-and-restack.md$PLUGIN_ROOT/skills/stacked-change-delivery/references/landing-and-handoff.md$PLUGIN_ROOT/skills/stacked-change-delivery/references/prepared-mutation-handoff.mdvalidate-snapshot. Require one linear chain,
unique change and branch identities, exact branch targets, exact parent-head
bindings, and unambiguous active worktree ownership. A writer principal may
own several distinct worktrees. A valid branch name or green badge is not
evidence that the composition is current.skipped, neutral, cancelled, superseded, or head-only results do not
establish current dependency proof. If a proof cannot start because an
unchanged external gate persists, keep a redacted task-local proof-gap
record, keep it out of accepted proofs, and do not retry until relevant
code, fixture, configuration, environment, or external state changes. Keep
snapshot proofs empty while any policy-required surface remains open;
partial evidence stays task-local.compare. Any ancestor head or topology change
invalidates the affected descendant closure. Restacking is a history rewrite
and needs explicit authorization; perform it bottom to top, preserve old to
new object-ID evidence and repository-required contribution attribution,
then rerun proof for every rewritten node. When another task will publish a
prepared rewrite, validate the additive prepared mutation handoff. Its v1
contract embeds exact pre-rewrite stacked_delivery.snapshot.v1 only; it
rejects snapshot v2 because prepared-mutation validation is not post-rewrite
readiness or handoff proof. Treat its authority record as preparation
evidence, not automatically fresh publication permission; validation does
not expand the receiver's authority. After mutation and readback, build a
fresh snapshot v2 before requesting a next action or handoff v2.
Immediately before the returned action, refresh the current owner, actor,
allowed action, scope, validity, remote lease, and any revocation or veto.
If an owned worktree is dirty when drift appears, stop edits and preserve it
with a bounded repository-native recovery mechanism. Rebinding preserves
work, not proof.next-action. Sequential mode may
select only the lowest current unlanded node. Atomic-prefix mode may select
only a contiguous proven prefix starting there, and only after live
feature detection confirms the forge will land that exact prefix. Never
skip an unlanded dependency. The command requires exact snapshot v2 and its
metadata inventory to be complete, content-bound, and metadata-current;
an exact legacy v1 snapshot remains parseable but returns blocked rather
than ready or complete.metadata-stale; it cannot support a
readiness claim, evidence reply, or handoff until it is updated under fresh
authority for that exact surface and action, or refreshed by its authoritative
producer, then read back. If its active bindings cannot be compared, use the
same fail-closed rule as metadata-unverified. An old identity may remain
only when explicitly historical and excluded from current proof. Do not
rewrite immutable provenance, lease, or old-to-new mappings. Metadata
inventory records carry exact opaque identity/evidence references and bind
to the canonical snapshot composition digest. The inventory audit digest
binds its completeness claim and exact active record list. Sort that list by
kind and record ID; an unverified audit dominates any concurrent stale
binding, and v2 compare fails when the canonical inventory digest changes.
Do not add historical or superseded non-proof records to that list. Metadata
freshness can block an independently applicable action; it never makes that
action required. In particular, zero eligible existing review discussions
means no evidence-reply gate and no substitute top-level note. Route
discussion eligibility and reply safety to the forge-specific review
workflow.validate-handoff, preserve its handoff digest, and pair the
receipt with a fresh next-action result. Call the receipt
content-addressed and tamper-evident. Do not call it immutable unless a
trusted signature or append-only attestation system independently records
the same digest.Use the deterministic guard for local gates:
python3 "$PLUGIN_ROOT/skills/stacked-change-delivery/scripts/stacked_delivery_guard.py" --help
Exit 0 means the requested read-only gate passed, 2 means drift or a gate
failure, and 1 means malformed or unreadable input. The guard never discovers
live state, proves ancestry by itself, verifies forge authenticity, judges test
adequacy, or authorizes a mutation.
Creates, edits, and verifies skills using a test-driven development approach with pressure scenarios and subagents.
npx claudepluginhub xopoko/plug-n-skills --plugin stacked-delivery