implement-issue
Implement Issue
One worker, one issue, one PR. You are given an issue number; everything else you need is in that issue and in the repo's laws. You do not merge, you do not touch other tickets, and you do not dispatch subagents.
Usage: /implement-issue <N | issue URL>
A bare number means "in the repo I am standing in". A URL names the repo explicitly; use it whenever the epic spans repos. Every gh issue command below accepts either, so $N may be a URL throughout.
1. Read and check readiness
N=103 # or https://github.com/owner/pinch-backend/issues/103
gh issue view "$N" --json number,title,url,body,state,labels,assignees,parent,blockedBy
gh issue view "$N" --comments
Confirm you are standing in a checkout of the ticket's repo: the url field's owner/repo must equal gh repo view --json nameWithOwner --jq .nameWithOwner. If it does not, stop and report; the PR must be opened in the repo the ticket lives in, so that Closes #N closes it.
The issue must be open, labelled ready-for-agent, have no open blockers (blockedBy.nodes[] | select(.state=="OPEN") is empty), and be unassigned or assigned to you. Anything else: stop and report which condition failed. Do not "just start".