ship
Own cleanup, rebase, one advisory suite, and draft PR. Load focused skills; do not duplicate them.
Inputs
$ARGUMENTS- optional feature name/root or descendant artifact, target branch (defaultorigin/main), feedback-focus hint, or--draft.- Live branch, working tree, remotes, and PR state.
Feature root
- Reuse a managed
FEATURE_ROOTonly when explicit/current-thread evidence ties it to this work (physical directory wins; never branch/recency/lifecycle/scans); distinct work ignores ambient roots. Otherwise, including on collision, standalone MUST first load and followSkill(spectre-feature-root)through DONE; orchestrated calls escalate. Keep writes beneath it and pass it unchanged.
Proof independence
Proof is optional: do not inspect, infer, invoke, or gate on it. Only authority or publication-safety impasses prevent PR creation.
Outputs + DONE
- PR URL, clean commits, rebase summary, tested SHA, verification/repair routing,
CI: pending, measurement, andPR_OPENEDstatusPASS|REPAIRED|PRE_EXISTING_FAILURES|INDETERMINATE|KNOWN_FAILURES_REMAIN.
DONE when: Prune/Test → Sweep, rebase, one full suite, repair/routing, measurement relay/degradation, and PR URL are complete. Non-green verification never prevents DONE.
Method / guardrails
- Resolve once. Confirm a feature branch, target,
FEATURE_ROOT, full set, and no unrelated/sensitive changes; stop onmain/master. Reuse current-threadCLEANED_THROUGH_SHAonly if unambiguous and ancestral; otherwise use the full set. Invokenode "${PLUGIN_ROOT}/hooks/scripts/workflow-cli.mjs" measure start --label Shipand relay its snapshot; below,measuremeansnode "${PLUGIN_ROOT}/hooks/scripts/workflow-cli.mjs" measure. - Cleanup boundary. Classify P0-P3; invoke
measure startfor Prune/Test, then one parallel dispatch:Skill(spectre-prune)through one prune lead andSkill(spectre-test)through one test lead with the same set, risk plan,{FEATURE_ROOT}, and--orchestrated. The test lead owns batching; neither stages/commits. At each child end invokemeasure finishfor its snapshot with its returned child identity when available; relay compact paths/checks and repair/route cross-boundary needs unlessNEEDS_AUTHORITY. - Sweep. Invoke
measure start --label "Sweep"; runSkill(spectre-sweep)with--orchestrated, unchanged set, and both results. It alone integrates stale/uncovered checks, repairs attributable failures, and commits; at Sweep end invokemeasure finishfor the Sweep snapshot. - Rebase. Invoke
measure start --label "Rebase"; runSkill(spectre-rebase)with target,--orchestrated, and--verification-owner parent; retain backup summary. No checks; at Rebase end invokemeasure finishfor the Rebase snapshot. - Observe one full suite after rebase. At rebased
FULL_SUITE_SHA, derive completeEXPECTED_BASE_SHA,EXPECTED_HEAD_SHA, andEXPECTED_DIFF_SHA256; invokemeasure start --label "Full suite"andmeasure start --label "Create PR". In parallel start the one full suite lane andSkill(spectre-create_pr)pending pass with target,--orchestrated --pr-phase pending, and that tuple; pending opens/returns a draft with local verificationRUNNING. At each lane end invokemeasure finishfor its snapshot with its returned child identity when available. No duplicate suites or raw child output.- Attribute exact failures
branch-caused|unrelated|indeterminate, preferring target-SHA CI and otherwise reproducing only the failing check at target. - Repair branch-caused families; rerun only failing/affected checks, never the full suite. Route unrelated/indeterminate findings; record repaired HEAD and
CI: pending. - Verification is evidence, never a stop condition.
- Attribute exact failures
- Create PR and measure. After the suite, call
Skill(spectre-create_pr)with target,--orchestrated --pr-phase final-update, existing URL/body, refreshed completeEXPECTED_BASE_SHA/EXPECTED_HEAD_SHA/EXPECTED_DIFF_SHA256, andFINAL_VERIFICATION_SUMMARY, changing Testing only; refresh candidate-sensitive claims first if repairs changed the tuple. OnPR_CANDIDATE_STALE, refresh and retry. Invokemeasure summary --rows … --outer-snapshot … --persist --project-dir … --feature-root "$FEATURE_ROOT" --base-sha "$EXPECTED_BASE_SHA" --head-sha "$EXPECTED_HEAD_SHA" --diff-sha256 "$EXPECTED_DIFF_SHA256"; relay its table, persistence status, and history path. Persistence degradation never blocks PR completion; never inspect transcripts, track clocks, or calculate. Unattributed Prune/Test and Full suite/Create PR use one exact parallel-group total; unavailable measurement never blocks Ship.
Never use --no-verify, force-push over unrelated remote history, suppress failures, or publish evidence containing secrets/PII.
Handoff
Return the PR URL plus compact PR_OPENED/verification status. End: Next (recommended): review the PR; CI owns merge-gating full-suite validation. Do not offer handoff after this terminal boundary.
Escalate-If
- A cleanup phase, rebase, or create-PR reports
NEEDS_AUTHORITYbecause no safe executable path exists without new user authority. - The branch/target is ambiguous, the remote diverged unexpectedly, or the diff contains secrets/PII.
- Never escalate solely for test/lint/type/build failures, full-suite status, repair count, diff growth, or candidate drift that can be refreshed.