Repository navigation
Issue-240: Put the per-ticket pipeline in the repo: red/blue reviews and board status - #243
Merged
Merged
Conversation
New skill .claude/skills/sx-ticket-run takes an issue from Ready to Done: plan, independent red/blue reviews of plan and code, implement in a worktree on a branch linked with gh issue develop, PR into dev, second review, merge only when GitHub allows (--match-head-commit, never --admin), close. It sets In progress and In review itself and checks the PR-issue link, because closing keywords do not act on PRs into dev. sx-implement points tickets to it; sx-ticket lists all Status option ids and a "Next" note; CLAUDE.md gets a row in "Agents and skills". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Literal absolute paths instead of shell variables across calls; user-only invocation; resume and reuse of existing branch, PR or merged PR; Review record added to the PR only after the second review; red never runs tests; stop on failing checks; project-scope and GraphQL error checks; exact merge gate; experiments outside the record; expected-status check before each board set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Step 0 resolves the root, checks the assignee and the branch author, resumes only an open PR (more than one: stop), takes the merged-PR shortcut only for the ticket's newest PR, and never closes a reopened ticket because of an old PR. A resume table replaces "first missing output". The CLOSED-not-Done stop applies only in step 0; step 9.6 sets Done after the close. pr-body.md has a literal scratchpad path, every gh pr/issue command takes -R, the exclude line runs before worktree add, and the approval-commit check is marked as stricter than the ruleset. CONTRIBUTING.md: main is the default branch; closing keywords in PRs into dev do not close issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #240
Summary
Moves the per-ticket pipeline, which lived only in one person's private Claude memory, into the repo, so every session follows it and the project board stays correct.
/sx-ticket-run <n> [--no-merge](.claude/skills/sx-ticket-run/SKILL.md). It takes an issue that is in Ready through these steps: plan → independent red and blue reviews of the plan → plan v2 → implement in a worktree on a branch linked to the issue → independent red and blue code review → PR intodev→ second review → merge (only when GitHub allows) → close.projectscope. It never usesitem-add.gh issue develop --base dev. The skill records the rawclosingIssuesReferencesoutput, and says "not linked: link by hand" when it is empty.headRefOid. It then runsgh pr merge --match-head-commit, with no strategy flag and never--admin. If the merge queue holds the PR, the skill stops at In review, and a rerun closes the ticket.disable-model-invocation: true, so the skill runs only when a person types the command. It never creates issues, never assigns, never touchesmain, works only in the worktree using literal absolute paths, runs heavy agents one at a time, and stops when checks still fail after one fix round.sx-implement: adds one pointer line ("For a GitHub issue, use/sx-ticket-run <n>"). It still never pushes.sx-ticket: adds the full Status option ids and a "Next" note (the lead moves a ticket to Ready;/sx-ticket-runtakes it from there).CLAUDE.md: adds one row in "Agents and skills".CONTRIBUTING.md:3: now saysmainis the default branch (frozen, D-42), all work goes throughdev, and closing keywords in PRs intodevdon't close issues. Lines 26 and 30 are left for the follow-up.Why the skill sets status itself
The board has no automation for In progress. PRs into
devstopped linking around 30 Nov: #233 and #235 linked, and #233 closed #202, but #237 onwards don't. That fitsdevno longer being the default branch, and closing keywords act only on PRs into the default branch. SoCloses #nneither links nor closes, and the "Pull request linked to issue" workflow never fires.Spec-gap choices
qa-expert) checks the diff on its own against plan v2 and each Done-when line. It does not verify red's findings, which keeps the two independent. The private memory had blue verifying red.chore/). This PR's own branch,feat/240-…, predates that rule.Test evidence (local)
This change is a skill (instructions), so there is no code to unit-test. Static checks:
sx-ticket-runandsx-ticket.git diff --stat origin/devlists only the 4 files (+242/−1).blocked_by,gh issue develop --list,git ls-remote, the PR search, the reviews/commit jq, the thread count andclosedByPullRequestsReferences.Done-when evidence (split, for the lead to accept or change):
gh issue developbranch. Result: not linked.gh pr view 243 --json closingIssuesReferencesgives[], and Put the per-ticket pipeline in the repo: red/blue reviews and board status #240'sclosedByPullRequestsReferencesgives[]. A branch created from the issue does not link a PR intodeveither. Not linked: link by hand in the issue sidebar → Development. The board is still correct, because this skill sets In review itself (read back: In review) and closes the issue explicitly after merge./sx-ticket-run 240 --no-mergeon the resume path. Its status read-backs will be added here./sx-ticket.Review record
Plan: red 14 findings, blue 26 items. Plan v1 → v2: 21 rows accepted, 1 partly, 0 rejected
devhas a merge queue, sogh pr mergeonly queues--match-head-commitgh pr diffdevor the ticket worktreeitem-addCode, red/blue (3815c9d): red 13 findings (1 blocking), blue 4 fixes; all accepted, fixed in b586142
git -C ""runs in the current directory. Fixed: literal absolute paths everywhere.disable-model-invocation: trueadded; reuse of an existing PR or branch; the record is added only after the second review; red never runs tests; stop when checks fail after one fix round;projectscope check, with a GraphQLerrorsfield treated as a stop; exact merge gate (CLEAN or HAS_HOOKS, the approved-commit jq); experiments kept outside the record;check-ignorewith-C; null item id → stop; status must match the one each step expects.Second review (pr-reviewer, b586142): request changes, 2 blocking, 6 should, 5 nits; all accepted, fixed in 1efe742
<ROOT>resolved in step 0, plus a resume table;pr-body.mdpath;CONTRIBUTING.md:3;-Ron every gh call; exclude line beforeworktree add; stricter-than-ruleset note.Follow-up drafts (not created)
CONTRIBUTING.md:26,30andCLAUDE.md:38say approvals need someone other than the last pusher and that new pushes dismiss approvals. Thedevruleset hasrequire_last_push_approval: falseanddismiss_stale_reviews_on_push: false.🤖 Generated with Claude Code