Transform a task/idea into a well-structured issue optimized for AI coding agents.
WRAP: Write effective issues | Refine instructions | Atomic tasks | Pair with agent
$ARGUMENTS - Task description, Jira ticket ID, or rough idea to transform
If Jira ticket provided:
- Fetch ticket via
mcp__atlassian__getJiraIssue - Extract requirements, acceptance criteria, linked issues
If raw idea:
- Clarify scope with user if ambiguous
- Identify relevant files/modules for the task
- Find existing patterns to reference
- Note testing conventions used
Structure the task as if explaining to a new developer:
- Title: Clear, specific location + action (e.g., "Add retry logic to ChargebeeClient.createSubscription")
- Context: Why this change? What problem does it solve?
- Requirements: Concrete, testable acceptance criteria
- Examples: Include code samples of desired patterns
Add project-specific guidance:
- Reference existing similar implementations
- Specify error handling patterns to follow
- Note any gotchas or edge cases
- Include relevant file paths
If task is large, break into independent sub-tasks:
- Each task should be completable in isolation
- Each should have clear definition of done
- Suggest dependency order if needed
Flag what needs human review:
- Security implications
- Architecture decisions
- External API changes
- Database migrations
## Issue: [Clear, Specific Title]
### Context
[Why this change is needed - 1-2 sentences]
### Requirements
- [ ] [Specific, testable requirement 1]
- [ ] [Specific, testable requirement 2]
- [ ] [Tests added/updated]
### Implementation Guidance
**Files likely involved:**
- `path/to/file.ts` - [what changes]
**Pattern to follow:**
```typescript
// Reference existing pattern from codebaseEdge cases to handle:
- [case 1]
- [case 2]
- Implementation complete
- Tests passing
- Lint/type checks pass
- [Any manual verification needed]
- [List items requiring human judgment]
---
## If Task is Too Large
Decompose into atomic issues:
```markdown
## Parent: [Overall Goal]
### Issue 1: [First atomic task]
[WRAP-formatted content]
### Issue 2: [Second atomic task]
Depends on: Issue 1
[WRAP-formatted content]
### Issue 3: [Third atomic task]
Can run parallel to Issue 2
[WRAP-formatted content]
| Bad Issue | Good Issue |
|---|---|
| "Fix auth" | "Add token refresh to AuthService when 401 received" |
| "Update tests" | "Add unit tests for UserService.validateEmail edge cases" |
| "Refactor payments" | "Extract PaymentProcessor interface from StripeClient" |