Turn a labelled ticket into a reviewed pull request: a planning agent drafts the plan, you approve it, a coding agent writes the code, and you review before merge: AI agent prompt
SPS Commerce, which connects about 50,000 retailers, suppliers and logistics companies, built what it calls a software factory on Port (case study published Oct 11, 2026). A developer labels a Jira ticket; a planning agent drafts an implementation plan using context from Jira, Azure DevOps and Kubernetes; the developer approves the plan; a coding agent writes the code and opens a GitHub pull request; the developer reviews and merges. Status updates go to Slack and dashboards, and developer feedback is collected on every run. In its first four months the workflow processed 500+ tickets and about 400 story points with zero incidents. Their rule of thumb: treat agents like junior developers and put human approval where engineers already review work, before implementation and before merge. The prompt below designs the same two-checkpoint flow for your team.
The prompt
Help me design a ticket-to-pull-request workflow for my team using AI agents. Our setup: ticket tracker [Jira / Linear / GitHub Issues], code host [GitHub / GitLab], chat [Slack / Teams], coding agent [Claude Code / Codex / Cursor / other]. Team size: [number]. The kinds of tickets I want agents to handle first: [e.g. dependency upgrades, small bug fixes, schema changes]. 1) Write the rules for which tickets qualify (size, risk, areas of code that are off-limits) and the label that sends a ticket to the agent. 2) Write the instructions for a planning agent: what context to gather (ticket, linked docs, related code, recent incidents), and the exact format of the plan it must post for approval (files to change, approach, tests, risks, rollback). 3) Define the two human checkpoints, plan approval before any code and code review before merge, and what the reviewer should check at each. 4) Write the instructions for the coding agent: follow only the approved plan, add or update tests, open a pull request that links the ticket and summarises what changed, and stop and ask if the plan turns out wrong. 5) List the status updates to post to chat and the 5 numbers to track each week (tickets taken, approved plans, merged PRs, rework rate, incidents). 6) Suggest a 2-week pilot on [5-10] low-risk tickets before widening it.
How to use it
- Copy the prompt above.
- Replace every [bracket] with your own details (or fill in the blanks on AgentPlaybook Real Estate, which remembers your answers for the next prompt).
- Paste it into Port, Jira, GitHub and review the answer before you use it.
Works with: Port, Jira, GitHub, Slack, Claude Code, Codex
Real-world example: port.io/case-study/sps-commerce-ai-software-factory
Before you use it: what to check
Check yourself
- This prompt works on text other people wrote (emails, reviews, messages or web pages). That text can hide instructions aimed at AI, such as "ignore your rules and…". Paste it as material to work on, and never let the AI act on requests inside it, like paying, sharing logins or changing records. How prompt injection works →
- Read and edit the draft before it reaches a customer or goes public. If you later automate this prompt, start with "draft and notify me", not "send automatically".
- Check names, dates, numbers and any claim against your own source material before you use the answer. AI can misread or invent details.
Using an AI agent? Download this prompt as a SKILL.md agent skill with these checks built in, or get the .zip for Claude.ai. How to install skills.
Want to make this prompt even better? Grade it with the free prompt grader or build your own with the AI prompt generator.
32 copy-paste agent prompts (PDF) plus 5 new prompts every week.
Get it free