Loading...
Loading...
Compare original and translation side by side
Note: With the draft-PR-first workflow (creates a draft PR upfront), this skill is primarily used for incremental commit+push operations to existing draft PRs. It gracefully handles both cases: existing PRs (reports "updated") and new PRs (creates one)./wt:new
注意: 在草稿PR优先的工作流中(会预先创建草稿PR),该技能主要用于向已有的草稿PR执行增量提交+推送操作。它能优雅处理两种场景:存在已有PR(提示「已更新」)和无PR(创建新PR)。/wt:new
/wt:commit-and-pr {STORY_ID} "{STORY_TITLE}"
/wt:commit-and-pr {STORY_ID} "{STORY_TITLE}" {PROOF_PATH} {EVIDENCE_PATH}/wt:commit-and-pr {STORY_ID} "{STORY_TITLE}"
/wt:commit-and-pr {STORY_ID} "{STORY_TITLE}" {PROOF_PATH} {EVIDENCE_PATH}/wt:commit-and-pr WINT-1012 "Add worktree management"
/wt:commit-and-pr WINT-1012 "Add worktree management" _implementation/PROOF-WINT-1012.md _implementation/EVIDENCE.yaml/wt:commit-and-pr WINT-1012 "Add worktree management"
/wt:commit-and-pr WINT-1012 "Add worktree management" _implementation/PROOF-WINT-1012.md _implementation/EVIDENCE.yaml| Parameter | Required | Default | Description |
|---|---|---|---|
| Yes | — | Story identifier (e.g., |
| Yes | — | Human-readable story title for commit message and PR |
| No | — | Path to PROOF file for PR body summary |
| No | — | Path to EVIDENCE.yaml for AC checklist in PR body |
| 参数 | 必填 | 默认值 | 描述 |
|---|---|---|---|
| 是 | — | 故事标识符(例如: |
| 是 | — | 人类可读的故事标题,用于提交信息和PR |
| 否 | — | PROOF文件的路径,用于PR正文摘要 |
| 否 | — | EVIDENCE.yaml的路径,用于PR正文的验收标准检查清单 |
tree/story/{STORY_ID}git add -Agit status --porcelaingit commit -m "feat({STORY_ID}): {STORY_TITLE}"git push -u origin story/{STORY_ID}gh pr list --head story/{STORY_ID} --state open --json number,urlgh pr create --title "{STORY_ID}: {STORY_TITLE}" --body "..." --base mainPROOF_PATHEVIDENCE_PATHtree/story/{STORY_ID}git add -Agit status --porcelaingit commit -m "feat({STORY_ID}): {STORY_TITLE}"git push -u origin story/{STORY_ID}gh pr list --head story/{STORY_ID} --state open --json number,urlgh pr create --title "{STORY_ID}: {STORY_TITLE}" --body "..." --base mainPROOF_PATHEVIDENCE_PATHCOMMIT AND PR COMPLETE
story_id: {STORY_ID}
branch: story/{STORY_ID}
commit: {short_sha}
pr_number: {number}
pr_url: {url}
pr_action: created | updatedCOMMIT AND PR COMPLETE
story_id: {STORY_ID}
branch: story/{STORY_ID}
commit: skipped (no changes)
pr_number: {number}
pr_url: {url}
pr_action: created | updated | unchangedpr_numberpr_urlCOMMIT AND PR COMPLETE
story_id: {STORY_ID}
branch: story/{STORY_ID}
commit: {short_sha}
pr_number: {number}
pr_url: {url}
pr_action: created | updatedCOMMIT AND PR COMPLETE
story_id: {STORY_ID}
branch: story/{STORY_ID}
commit: skipped (no changes)
pr_number: {number}
pr_url: {url}
pr_action: created | updated | unchangedpr_numberpr_url| Error | Action |
|---|---|
| Not in a worktree | ERROR: "Not inside story worktree. Run from tree/story/{STORY_ID}." |
| ERROR: "GitHub CLI (gh) is required. Install: https://cli.github.com" |
| No changes to commit | WARNING: Skip commit/push, still check/create PR |
| Push fails (no remote) | ERROR: "Push failed. Check remote configuration." |
| Push fails (rejected) | WARNING: "Push rejected. Try pulling first: git pull --rebase origin story/{STORY_ID}" |
| PR creation fails | ERROR: Report |
| Not authenticated | ERROR: "gh auth required. Run: gh auth login" |
| 错误 | 处理动作 |
|---|---|
| 不在工作树内 | 错误提示:"Not inside story worktree. Run from tree/story/{STORY_ID}." |
| 错误提示:"GitHub CLI (gh) is required. Install: https://cli.github.com" |
| 没有待提交的变更 | 警告:跳过提交/推送,仍会检查/创建PR |
| 推送失败(无远程仓库) | 错误提示:"Push failed. Check remote configuration." |
| 推送失败(被拒绝) | 警告:"Push rejected. Try pulling first: git pull --rebase origin story/{STORY_ID}" |
| PR创建失败 | 错误提示:逐字返回 |
| 未完成认证 | 错误提示:"gh auth required. Run: gh auth login" |
git add -Afeat({STORY_ID}): {STORY_TITLE}mainghgit add -Afeat({STORY_ID}): {STORY_TITLE}maingh