jmb-implement-ticket
Installation
SKILL.md
jmb-implement-ticket <n>
Take ticket <n> to a green, ready PR, or to a draft PR with a report that says why. Work where you are invoked and only there:
- No path in the prompt: the checkout you are in (its resources, those of the "Main checkout" column of Isolated resources in § Worktree if
flow.mdhas it; the "Sequential flow" section of AGENTS.md). You create the branch, in place. - With a path (a worktree that
jmb-implement-frontierprepared, with its branch and its isolated resources already set up: Prepare of § Worktree, "Worktree for ticket<n>" column of Isolated resources): all git goes throughgit -C <path>and everything else throughcd <path> && …in the same Bash call; files, by absolute path. In a subagent thread the cwd does not survive from one call to the next, and the git hook judges the call's directory: agit commitwithout-Cwould be judged against the main checkout, onmain, and blocked. The path goes literal in every-C: the hook reads the line before the shell expands it, so agit -C $W commitis blocked all the same.
What is specific to the project comes from docs/agents/flow.md: each § is one of its headings, and each italic is the label of one of its fields. If the project does not have it, stop and ask for jmb-setup to be run.
Steps
- Context. The ticket (
gh issue view <n> --comments), the spec sections it cites (Path of § Spec) and the ADRs of the area you are going to touch (where they live, indocs/agents/domain.md). Done when you can list the ticket's acceptance criteria and say which seam tests each one. - State. With
git branch --show-current,gh pr list --head <n>-<slug> --state openand, if there is a PR, whether it has a pending review: pending-review.sh decides it (see ../jmb-review-pr/protocol.md), and you do not read the comments yourself. Run it asbash <this skill's base directory>/../jmb-review-pr/pending-review.sh <pr>, by absolute path, which works from the main checkout and from a worktree alike. Exit0is the first case below;1, the cases after it;2, it could not answer: stop and report. The first case that matches:- PR with a pending review: the script exited
0, and what it printed is the review comment. Jump to Fixes after review. - No branch, meaning
<n>-<slug>exists neither locally nor onorigin:git checkout -b <n>-<slug>(the slug comes from the title, without accents; in its own Bash call). Continue at 3. - Branch created and you are not on it, the main checkout's case:
git checkout <n>-<slug>with a clean tree (git status --porcelainempty, or stop) andgit pull --ff-onlyto bring in what was pushed. Continue at whichever case applies. - Branch without a PR: continue at 3.
- Open PR: check the acceptance criteria against the branch; those missing, step 3; if they are all there, jump to 6 (you were relaunched because
mainmoved).
- PR with a pending review: the script exited