Loading...
Loading...
Commit all changes, push to remote, and create or update a GitHub PR for a story branch. With the draft-PR-first workflow, this is primarily used for incremental pushes to existing draft PRs. Also handles legacy cases where no PR exists yet.
npx skill4agent add michael-menard/monorepo wt-commit-and-prNote: 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
/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| 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 |
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_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_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" |
git add -Afeat({STORY_ID}): {STORY_TITLE}maingh