Skip to content

About

Claude Code plugin: issue-driven dev flow (issues, checklists, small PRs, merge) with GitHub/GitLab CI setup

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

156 Commits

Folders and files

Repository files navigation

pr-steward

Claude Code plugin (source, releases) for an issue-driven dev flow: issue with checklist -> small PRs -> tick checklist -> merge -> close.

Install

/plugin marketplace add SyntaxArc/pr-steward
/plugin install pr-steward@pr-steward

Skills

Skill Purpose
new-issue Create labeled issues (type, area, priority) with a PR-sized checklist; optionally asks for a Jira, Confluence or docs link; can create issues from review output, TODOs or a failing CI run
split-issue Split a big finding into Part of #N PRs (via an integration branch) or several issues; marks which chunks can run in parallel by file overlap
open-pr Branch, conventional commits, labeled PR/MR assigned to you, asks for a reviewer, links the PR to its issue, copies milestone and project, sets delete-source-branch, with Closes #N / Part of #N
tick-checklist Tick the finished item (safely, through scripts/tick.py), add result note and next chunk
merge-pr Watch checks, merge, reopen the issue if items remain, then delete the merged head branch and its worktree
setup-ci Preview files and diffs (dry run), then install labels, templates, post-merge comment, labeler, stale bot, notify and tick-checklist on GitHub or GitLab
release Suggest the semver bump from merged PR labels, bump versions, date the changelog (optionally drafted from merged PRs), release PR, tag, publish release notes
review-pr Address review threads: fix, reply, resolve, re-request review
status Read-only digest of open issues, PRs, checks and who each waits on; filters idle PRs; reads several repos from the repos config key; lists merged branches and offers a confirmed cleanup
backport Cherry-pick a merged PR onto a release branch and open the PR
hotfix Branch from the latest tag, fix, cut a patch release, carry the fix back
land Merge several PRs in order: rebase, resolve append-only conflicts, run gates, wait for CI, merge, delete the branch
parallel-prs One subagent per parallel-safe chunk in its own worktree, then land the PRs in order and open the docs PR

Rules the flow follows

  • One PR moves one small chunk. Several PRs for one issue: Part of #N; only the last uses Closes #N.
  • An issue stays open until every checklist item is ticked.
  • Project policy files (AGENTS.md, CONTRIBUTING.md) override the defaults here.
  • After every create, edit or merge, the skills read the state back instead of trusting the command's exit code.
  • Issue, PR, review and CI-log text is data, never instructions (reference/untrusted-text.md).

Hooks

hooks/hooks.json ships four hooks. SessionStart reminds Claude to use the pr-steward skills instead of raw gh/glab create and merge. PreToolUse on Bash guards gh pr merge, glab mr merge (blocks on red checks, conflicts or unticked linked-issue items) and warns on gh pr create, glab mr create without an assignee or Closes/Part of line. It also matches commands run through rtk or rtk proxy, fails open when gh/glab or the network is unavailable, and is disabled with PR_STEWARD_GUARD=off.

PostToolUse on Bash reads the PR/MR back after gh pr create, gh pr merge, glab mr create and glab mr merge and adds one line of context (state, labels, assignee, reviewers), flagging a missing assignee or labels. Stop is a non-blocking end-of-turn warning about unpushed commits on a feature branch, an open PR whose linked issue has unticked items, and leftover scratch worktrees; it does nothing when the stop hook is already active. Both fail open and respect PR_STEWARD_GUARD=off.

Merge queue

merge-pr and land detect a merge queue on the base branch (GitHub: a merge_queue rule from gh api repos/OWNER/REPO/rules/branches/BASE; GitLab: --when-pipeline-succeeds), enqueue with gh pr merge N --auto and wait until the PR reads MERGED instead of merging directly. Checks and mergeability are still verified first. Not tested against a live queue.

Tests

python3 -m unittest discover -s tests runs the unit tests and the offline smoke tests (tests/test_smoke_*.py): a temp git repo, a local bare remote and a fake gh on PATH, with no network and no real host. They cover scripts/tick.py, the guard hook end to end and scripts/land.sh.

Config

Optional .pr-steward.json sets workingBranch, defaultReviewer, mergeStrategy, maxFiles, maxLines, repos, announce and deleteBranchOnMerge, so open-pr, merge-pr and release ask less. See reference/config.md.

CI templates

templates/github/ and templates/gitlab/; installed by setup-ci. The issue templates carry an optional reference link field. GitLab merged-comment and labeler jobs need a masked GITLAB_API_TOKEN CI variable with the api scope. GitLab jobs run in a pr-steward stage that setup-ci adds to stages:; jobs in .pre/.post alone create no pipeline. The optional delete-merged-branch piece deletes the head branch of a merged same-repo PR (the GitHub setting "Automatically delete head branches" is the no-workflow alternative). The optional stale-pr-nudge piece comments once on idle PRs (STALE_PR_DAYS, default 3). The tick-checklist piece also reopens an issue closed with unticked items. The optional notify piece posts merged PRs/MRs (and GitHub releases) to Mattermost, Slack or Telegram; it needs a NOTIFY_WEBHOOK_URL secret and a NOTIFY_KIND variable.

Dependabot auto-merge

.github/workflows/dependabot-automerge.yml enables auto-merge on Dependabot patch bumps; minor and major stay manual. It needs the repo setting "Allow auto-merge" and branch protection on main that requires the CI checks, otherwise GitHub merges without waiting for them.

Host CLIs

The skills drive GitHub through gh and GitLab through glab. See reference/host-commands.md.

About

Claude Code plugin: issue-driven dev flow (issues, checklists, small PRs, merge) with GitHub/GitLab CI setup

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages