Skip to content

About

Agentic ticket-to-PR workflow: bounded loops, human approval at irreversible steps, and a git denylist to cap blast radius (Professional, 2026)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

claude-code-ticket-workflow

Three Claude Code slash commands that take a ticket from design to merged PR, with human approval gates and strict git rules.

Ticket
  |
  v
/design-ticket       ticket -> dev-doc (+ optional ADR), approved by you
  |
  v
/implement-ticket    dev-doc -> branch -> code + tests -> approval -> commit/rebase/push/PR
  |
  v
/copilot-review      waits for Copilot's PR review, fixes valid comments,
  |                  runs tests, loops until checks are green
  v
Merged PR

The commands

/design-ticket: paste a ticket, get a dev-doc written to disk. Explores the codebase first (build files, conventions, nearest existing pattern), includes a security review that feeds design decisions, and writes an ADR when the change is architectural. Loops until you approve. Can also be pointed at an existing dev-doc to discuss or amend it.

/implement-ticket PROJ-12345: implements an approved dev-doc. Verifies the codebase still matches the doc's assumptions, creates or checks out the ticket's feature branch, writes code and tests to disk for you to review as diffs, then waits. Only after you answer "yes" does it stage the exact file list, commit, rebase onto the base branch, push, and create or update the PR.

/copilot-review: run from the branch with the open PR. Polls on scheduled wakeups until Copilot reviews the current head commit, triages each comment as valid or invalid with a rationale table, commits the smallest fix for valid ones, replies and resolves threads, runs the test suite, pushes, and loops up to 3 iterations.

Git rules

The commands run only the exact git sequences written in them:

  • Stop on any git failure and report. No recovery attempts: rebase --abort, reset, stash, cherry-pick, and plain --force are banned.
  • Files staged path by path from a known list. No git add . or -A.
  • --force-with-lease allowed in exactly one place: re-pushing an already-pushed branch after a rebase.
  • Untracked local files are never staged and never cleaned up.
  • Multi-repo tickets are partitioned; each repo gets its own run and PR.

Install

cp commands/*.md ~/.claude/commands/

Or into a project's .claude/commands/ to scope them to one repo.

Then edit the Configuration section at the top of each command:

Placeholder Default Meaning
{{TICKET_PREFIX}} PROJ Issue tracker project key (BIZ, ENG, ...)
{{BASE_BRANCH}} develop Branch features are cut from and rebased onto
{{TEST_COMMAND}} mvn verify Full test-suite command
{{DOCS_DIR}} ~/.claude/docs Where dev-docs and ADRs live

Requirements: Claude Code, git, authenticated GitHub CLI (gh), Jira-style ticket IDs (PREFIX-12345). /copilot-review needs Copilot code review enabled on the repo.

Usage

cd ~/development/your-repo
/design-ticket                 # paste the ticket, iterate until approved
/implement-ticket PROJ-12345   # review diffs, approve, PR is created
/copilot-review                # hands-off review loop

Optional: /design-ticket reads {{DOCS_DIR}}/examples/ (an example ticket, approved dev-doc, PR descriptions) as a quality bar if it exists. Saving your first few approved dev-docs there improves later runs.

License

MIT. See LICENSE.

About

Agentic ticket-to-PR workflow: bounded loops, human approval at irreversible steps, and a git denylist to cap blast radius (Professional, 2026)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors