Ticket Workflow
Autonomous ticket-to-production lifecycle with promptlet-driven phases. Use when executing /ticket commands or working on ticket-driven development.
Best use case
Ticket Workflow is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Autonomous ticket-to-production lifecycle with promptlet-driven phases. Use when executing /ticket commands or working on ticket-driven development.
Teams using Ticket Workflow should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ticket-workflow/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Ticket Workflow Compares
| Feature / Agent | Ticket Workflow | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Autonomous ticket-to-production lifecycle with promptlet-driven phases. Use when executing /ticket commands or working on ticket-driven development.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Ticket Workflow
## Overview
The ticket workflow drives an autonomous agent through 10 phases from ticket intake to production validation. Each phase is defined by a **promptlet** -- a markdown template that specifies what agents to spawn, how they coordinate, and what they produce.
## Phases
| # | Phase | Key | Session Boundary |
|---|-------|-----|-----------------|
| 1 | Intake | intake | no |
| 2 | Planning | planning | YES - human reviews plan |
| 3 | Implementation | implementation | no |
| 4 | Verification | verification | no |
| 5 | PR Creation | pr-creation | no |
| 6 | CI + Review Loop | ci-review-loop | YES - if 3 fix attempts fail |
| 7 | Human Merge Gate | human-merge-gate | YES - always |
| 8 | Deploy Watch | deploy-watch | YES - conditional |
| 9 | Production Validation | production-validation | no |
| 10 | Completion | completion | no |
## Phase Transitions
- Phases execute sequentially from 1 to 10
- The orchestrator (main session) reads the promptlet for the current phase, spawns agents as specified, collects results, updates state, and transitions to the next phase
- Session boundaries cause the agent to save state and stop. Human resumes with `/ticket <id>`
- The agent NEVER auto-merges. Phase 7 (human-merge-gate) always requires human action
## Promptlet Resolution
Two-tier resolution, project-local overrides defaults:
1. **Project-local**: `.claude/ticket-agent/promptlets/<phase>.md`
2. **Plugin default**: `${CLAUDE_PLUGIN_ROOT}/skills/ticket-workflow/resources/promptlets/<phase>.md`
If a project-local promptlet exists, use it (it already contains project-specific knowledge from `/ticket-learn`). Otherwise, fall back to the generic default.
## State Management
State is stored at `.claude/ticket-agent/state/<ticket-id>.json` in the target project. The state file is immutable-write (full replace each time). It tracks:
- `ticket_id`: The ticket identifier
- `current_phase`: Which phase the ticket is in
- `branch_name`: The VCS branch (created during implementation)
- `pr_number` and `pr_url`: PR details (set during pr-creation)
- `phases`: Per-phase status and data
## VCS
All VCS operations use `jj` by default. Projects using git can override via learned promptlets.
## Agent Topology
All sub-agents are `general-purpose` type. The promptlet defines:
- Which agents to spawn and their instructions
- Whether agents work in parallel or sequentially
- What each agent reports back
- How failures are handled
The `/ticket` command in the main session IS the orchestrator. Sub-agents cannot spawn sub-agents.
**CRITICAL ORCHESTRATOR RULE**: The orchestrator MUST delegate work to sub-agents as defined by each promptlet. During phases that define agents (especially implementation), the orchestrator MUST NOT directly use Edit, Write, Grep, or Bash tools for code changes. It should only use tools for state management (reading/writing state files) and spawning agents. Each promptlet's agent templates contain literal prompt text — the orchestrator fills in values from state data and passes the constructed prompt to the Agent tool. If a promptlet defines per-component agents, the orchestrator iterates over the components array and spawns one agent per component.
## Session Boundaries
The agent saves state and ends at these natural breakpoints:
- After **planning** phase (human reviews plan before coding starts)
- After **CI failures** exhaust 3 fix attempts
- At **human merge gate** (human must merge the PR)
- When **waiting for deploy** to complete
## CI + Review Monitoring Loop
After the PR is created, the ci-review-loop phase forms a continuous monitoring loop:
1. Push the PR
2. Poll CI status and PR comments in parallel
3. If CI fails -> analyze, fix, push (restarts CI check)
4. If review comments arrive -> address them, push
5. Loop exits when: CI green AND PR approved (or no outstanding comments)
6. Max 3 CI fix attempts before session boundary
## Resources
Reference documents for this workflow:
- `resources/phase-reference.md` - Detailed phase definitions and transition rules
- `resources/promptlet-format.md` - How to write and customize promptlets
- Default promptlets in `resources/promptlets/` - Generic implementations for each phaseRelated Skills
setup-sprite
Set up a reproducible remote dev environment using sprites with credential-free git sync. Use when user asks to "set up a sprite", "create a remote dev environment", "use sprites", or mentions wanting a reproducible remote environment for a project.
Writing python services
Writing a class with encapsulated logic that interfaces with an external system. Logging, APIs, etc.
stacked-pr-review
Use when addressing PR review comments on stacked jj branches. Triggered by phrases like "address review comments", "fix PR feedback", "respond to review on stacked branch", or "update the PR with reviewer suggestions".
Python Code Style
Use when writing python code. Can be used for code review.
Plan
My planning skill that has additional instructions. Always use when entering plan mode.
Modal
No description provided.
merging-pr-stack
Use when merging a stack of stacked PRs with jj. Triggered by phrases like "merge the PR stack", "merge the stacked PRs", "land these PRs", or "merge the stack into main".
Creating Slash Commands
Build custom slash commands in Claude Code with YAML frontmatter, permissions, and best practices. Use when creating automation workflows, project-specific commands, or standardizing repetitive tasks.
Creating Hooks
Build event-driven hooks in Claude Code for validation, setup, and automation. Use when you need to validate inputs, check environment state, or automate tasks at specific lifecycle events.
Create Claude Channel
Step-by-step procedure for building a Claude Code channel integration. Use when creating a new channel plugin that connects Claude Code to external systems via MCP, named pipes, webhooks, or chat platforms.
Committing
Any time committing, pushing, or creating new revisions is mentioned, use this commit flow.
SOLID Principles Code Review
Review Python code for adherence to SOLID principles (SRP, OCP, LSP, ISP, DIP). Use when reviewing Python code for maintainability, testability, and design quality.