一键导入
ship
Create PR and advance to next phase
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create PR and advance to next phase
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Creates a new Cobra CLI command following the project's New*Cmd() pattern in internal/cli/. Handles command registration in root.go, flag setup, output rendering, and test scaffolding. Use when user says 'add command', 'new subcommand', 'create CLI command', or adds files to internal/cli/. Do NOT use for MCP tools or hooks.
Creates a new hook event handler in internal/hook/ following the handle*() dispatcher pattern. Adds event constant to events.go, handler function, dispatcher case, and tests using fake bd binary. Use when user says 'add hook', 'new hook event', 'hook handler', or modifies internal/hook/. Do NOT use for MCP tools, CLI commands, or graph queries.
Creates a new MCP tool following the handle*() pattern in internal/mcp/. Registers in registerTools(), adds args struct, result struct, handler function, and test using connectInProcess(). Use when user says 'add MCP tool', 'new tool', 'expose to Claude', or adds files to internal/mcp/. Do NOT use for CLI commands (internal/cli/), graph client methods, or Cobra commands.
Build modular CLI applications with Cobra framework. Use when structuring CLI commands, implementing modular command architecture, handling flags and arguments, or when user mentions Cobra, CLI modularity, command registration, or spf13/cobra.
Implements beads graph operations in internal/graph/ using the bd CLI wrapper pattern. Covers bead CRUD, label queries, tier classification, batch writes, and index management. Use when user says 'graph operation', 'bead query', 'add graph method', 'graph client', or modifies internal/graph/. Do NOT use for direct bd CLI usage, MCP tool handlers, or CLI command implementations in internal/cli/.
Writes tests using the fake_bd test binary pattern from internal/graph/testdata/fake_bd/. Covers building fake binary, setting FAKE_BD_* env vars for canned responses, capture files for arg/env verification, and serverState/hookState setup. Use when user says 'write tests', 'add test', 'test coverage', or needs to test graph/mcp/hook code that calls bd. Do NOT use for tests that don't invoke the bd CLI binary (e.g., pure utility functions, config parsing, CLI flag tests).
| name | ship |
| description | Create PR and advance to next phase |
| disable-model-invocation | true |
| argument-hint | [phase_number] |
Ship the phase specified in $ARGUMENTS (or the current phase from project context) by creating a PR with bead-sourced summary and advancing phase state.
You are a ship coordinator. Create PRs and advance project state. Never mention beads, bead IDs, or graph structures to the developer. Use phase numbers and plan IDs in all developer-facing output.
Determine the target phase number from $ARGUMENTS. If not provided, call get_status to determine the current phase number.
Call the create_pr_summary MCP tool with phase_num. You will receive { title, body, branch_name }.
If create_pr_summary returns an error, display it and stop.
Display the PR title and body in a formatted block so the developer can review it:
## PR Preview
**Title:** {title}
**Branch:** {branch_name}
**Body:**
{body}
Then display: "Creating PR... (auto-continuing in 30 seconds...)"
Wait 30 seconds before proceeding to Step 4.
Check whether there are commits ahead of main to ship:
git status --short
git log origin/main..HEAD --oneline
If there are no commits ahead of main, display:
No changes to ship. All work is already on main.
Skip PR creation and proceed directly to Step 6 (advance phase).
Otherwise, create the PR using the GitHub CLI:
git checkout -b {branch_name} 2>/dev/null || git checkout {branch_name}
git push -u origin {branch_name}
gh pr create --title "{title}" --body "{body}"
If gh fails because it is not installed or the user is not authenticated, display the error and instruct the developer:
gh CLI is required for PR creation.
- Install: https://cli.github.com/
- Authenticate: gh auth login
Once ready, retry with: /gsd-wired:ship {phase_num}
Then stop — do not proceed to phase advancement without a successful PR.
Show the PR URL returned by gh pr create:
PR created: {pr_url}
Call the advance_phase MCP tool with phase_num and reason="Shipped as PR".
Display:
Phase {N} complete.
If advance_phase fails, display the error but note that the PR was already created (if applicable) and no phase state was changed.
If advance_phase returns a next_phase object, display:
Next up: Phase {next_phase.phase_num}: {next_phase.title}
Ready to plan? (auto-continuing to /gsd-wired:plan {next_phase.phase_num} in 30 seconds...)
Wait 30 seconds, then auto-proceed to run /gsd-wired:plan {next_phase.phase_num}.
If there is no next_phase, display:
All phases complete. Project shipped.
create_pr_summary error: display the error message and stopgh pr create failure: display error with install/auth instructions, stop (do not advance phase)advance_phase failure: display error, note PR was already created, do not retry