Context-aware ship workflow - merge PR, deploy, and verify (with worktree cleanup for trips).
From corenpx claudepluginhub qmu/workaholic --plugin coreNotice: When user input contains /ship, /ship-drive, or /ship-trip - whether "run /ship", "do /ship", "ship it", or similar - they likely want this command.
Context-aware ship command that auto-detects whether you are in a drive or trip workflow, merges the PR, deploys, and verifies. For trip workflows, it additionally cleans up the worktree.
bash ${CLAUDE_PLUGIN_ROOT}/skills/branching/sh/check-workspace.sh
Parse the JSON output. If clean is true, proceed silently to Step 1.
If clean is false, display the summary to the user and ask via AskUserQuestion with selectable options:
If the user selects "Stop", end the command immediately.
bash ${CLAUDE_PLUGIN_ROOT}/skills/branching/sh/detect-context.sh
Parse the JSON output. Route to the appropriate workflow based on context.
context: "drive")bash ${CLAUDE_PLUGIN_ROOT}/../trippin/skills/ship/sh/pre-check.sh "<branch>". If found is false: inform user "No PR found for this branch. Run /report first." and stop. If merged is true: skip to Deploy.bash ${CLAUDE_PLUGIN_ROOT}/../trippin/skills/ship/sh/merge-pr.sh "<pr-number>". On failure, inform user and stop.bash ${CLAUDE_PLUGIN_ROOT}/../trippin/skills/ship/sh/find-cloud-md.sh. If found is false: inform user "No cloud.md found. Deployment skipped." and skip to summary. If found is true: read the file, find ## Deploy section, ask confirmation via AskUserQuestion, execute if confirmed.## Verify section and execute. Report results.context: "trip")Use the trip_name from the detection result, or $ARGUMENT if provided.
bash ${CLAUDE_PLUGIN_ROOT}/../trippin/skills/ship/sh/pre-check.sh "trip/<trip-name>". If found is false: inform user "No PR found for this trip. Run /report first." and stop. If merged is true: skip to Clean up worktree.bash ${CLAUDE_PLUGIN_ROOT}/../trippin/skills/ship/sh/merge-pr.sh "<pr-number>". On failure, inform user and stop (worktree preserved).bash ${CLAUDE_PLUGIN_ROOT}/../trippin/skills/trip-protocol/sh/cleanup-worktree.sh "<trip-name>". Report what was cleaned up.context: "trip_drive")This branch started as a trip and has drive-style tickets. Follow the Drive Context shipping workflow (steps 1-5), then additionally clean up the trip worktree:
bash ${CLAUDE_PLUGIN_ROOT}/../trippin/skills/trip-protocol/sh/cleanup-worktree.sh "<trip_name>" using trip_name from detection result. Report what was cleaned up.context: "trip_worktree")Not on a trip branch, but trip worktrees exist.
bash ${CLAUDE_PLUGIN_ROOT}/../trippin/skills/trip-protocol/sh/list-trip-worktrees.shhas_pr is true (trips with PRs ready to ship)/report first." and stop.context: "unknown")Ask the user: "Could not determine development context from branch '<branch>'. Are you working on a drive or trip?" using AskUserQuestion with options "Drive" and "Trip". Route accordingly.