skills/plan-jira-ticket/SKILL.md
Create a work plan for a Jira ticket. Use when asked to plan work, create a plan for a ticket, break down a Jira issue, or prepare implementation steps for a Jira ticket ID like CM-1234. Reads local ticket details, deeply analyzes requirements and root causes, proposes up to three optimized solutions (not workarounds) with pros and cons, asks the user to choose, then finalizes the plan with that choice under docs/<ticket-id>/.
npx skillsauth add shysssthanhtri/AI-tools plan-jira-ticketInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create a comprehensive, shareable work plan for a Jira ticket. The plan captures fully understood requirements, evidence-based root cause or constraint analysis, up to three legitimate optimized solution options (with pros and cons), a user decision checkpoint, and—only after the user chooses—the detailed implementation plan, tasks, and progress tracking under ./docs/<ticket-id>/ so the team can review and collaborate.
You are a senior software engineer who plans before coding. You:
plan.md to lock in Chosen Solution, phases, tasks, tests, and risks. Then confirm completion.setup-new-work skill must have been run first. It creates an isolated git worktree at ./worktrees/<ticket-id>-<platform>/, checks out branch feature/<ticket-id>-<slug>-<platform>, and writes docs/<ticket-id>/<ticket-id>.md (local story snapshot). This skill still creates plan.md and progress.md under docs/<ticket-id>/, and runs Step 1b only if the ticket summary file is missing (e.g. legacy worktrees).All planning, implementation, and documentation must happen inside the worktree directory prepared by the setup-new-work skill:
./worktrees/<ticket-id>-<platform>/
This ensures:
docs/<ticket-id>/plan.md) are relative to the worktree root.feature/<ticket-id>-<slug>-<platform>) is already checked out.If the current working directory is not the worktree, cd into it before proceeding:
cd "$(git rev-parse --show-toplevel)/worktrees/<ticket-id>-<platform>"
| Parameter | Required | Description | Example |
|-------------|----------|------------------------------------|-----------|
| ticket-id | Yes | The Jira ticket key | CM-4873 |
CM-4873). If not provided, ask for it../worktrees/<ticket-id>-<platform>/. If it does not, stop and instruct the user to run the setup-new-work skill first.cd into it.If docs/<ticket-id>/<ticket-id>.md does not exist inside the worktree, create it:
mcp_com_atlassian_getAccessibleAtlassianResources for cloudId, then mcp_com_atlassian_getJiraIssue with issueIdOrKey = ticket key and responseContentFormat = markdown.mkdir -p docs/<ticket-id> and write docs/<ticket-id>/<ticket-id>.md with the issue summary, description, status, priority, type, people, labels, sprint, acceptance criteria, subtasks/links, and a short Notes section — matching the level of detail you need for planning (mirror the structure you would use for a team-facing ticket brief).docs/<ticket-id>/<ticket-id>.md completely.Investigate the repository until you can explain why the gap exists (bug) or where the right extension points are (feature):
Document findings as Codebase Analysis and a dedicated Root Cause Analysis (bugs) or Problem & Constraint Analysis (non-bugs) section in the plan.
Create or update docs/<ticket-id>/plan.md using the first-write template below (sections 1–3, 4 for solution options, plus testing/risks placeholders as needed). Set frontmatter status: 'Awaiting decision' until the user chooses.
Create or update docs/<ticket-id>/progress.md with status indicating planning is waiting on solution choice (see progress template).
Present the solution options clearly in the chat:
Stop here until the user responds. Do not mark the skill complete and do not finalize implementation phases until you have their choice.
When the user chooses (or specifies a hybrid with enough detail):
docs/<ticket-id>/plan.md:
status: 'Planned' (or 'Ready for implementation') and refresh last_updated.docs/<ticket-id>/progress.md — Reset task table to match the chosen plan; set overall status to 🔵 Planned (or 🟡 In Progress if implementation already started).After the plan is updated with the user’s choice:
✅ Plan finalized for <ticket-id>
Plan: docs/<ticket-id>/plan.md
Progress: docs/<ticket-id>/progress.md
Chosen: Solution <N> — <short label>
Phases: <N> phases, <M> tasks total
Next step: Review the plan, then start implementation.
If the user has not yet chosen a solution in this session, use instead:
⏸️ Plan awaiting your decision — <ticket-id>
Plan: docs/<ticket-id>/plan.md
Please choose Solution 1, 2, or 3 (or describe a hybrid).
The implementation breakdown will be added after you decide.
Use this structure until the user selects a solution. After selection, merge into the full template below.
---
ticket: <ticket-id>
goal: "<Jira summary>"
date_created: <YYYY-MM-DD>
last_updated: <YYYY-MM-DD>
status: 'Awaiting decision'
tags: [<comma-separated tags e.g. feature, bug, refactor>]
---
# Plan: <ticket-id> — <Jira Summary>

## 1. Requirements Summary
- **REQ-001**: <Requirement 1>
- **AC-001**: <Acceptance criterion 1>
- <Implicit requirements or scope notes as needed>
## 2. Codebase Analysis
<Summary of findings.>
### Affected Files & Components
| # | File / Component | Role | Impact |
|---|-----------------|------|--------|
| 1 | `path/to/file` | <What it does> | <What needs to change> |
### Current Behaviour
<How the system works today in the affected area.>
### Root Cause Analysis (bugs) / Problem & Constraint Analysis (non-bugs)
- **Evidence**: <paths, flows, tests>
- **Root cause or core constraint**: <concise>
- **Why superficial fixes fail**: <if relevant>
### Existing Test Coverage
| Test File | Covers |
|-----------|--------|
| `tests/...` | <What it tests> |
### Conventions & Patterns Observed
- <Pattern 1>
## 3. Solution Options (Choose One)
You must select one option (or approve a stated hybrid) before implementation tasks are finalized.
### Solution 1 — <Short name>
**Summary:** <2–4 sentences.>
**Pros**
- <pro 1>
- <pro 2>
**Cons**
- <con 1>
- <con 2>
### Solution 2 — <Short name>
**Summary:** …
**Pros** / **Cons** — …
### Solution 3 — <Short name>
(Include only if there is a third genuine option.)
**Summary:** …
**Pros** / **Cons** — …
### Recommendation (Optional)
<If one option is clearly stronger, say why—user still confirms.>
## 4. Testing Strategy (Preview)
<High-level: what kinds of tests will matter regardless of option; detailed table after choice.>
## 5. Risks & Assumptions (Preview)
- **RISK-001**: …
## 6. References
- Ticket: docs/<ticket-id>/<ticket-id>.md
After the user chooses, ensure plan.md includes everything from the first-write template plus the sections below, with status: 'Planned'.
---
ticket: <ticket-id>
goal: "<Jira summary>"
date_created: <YYYY-MM-DD>
last_updated: <YYYY-MM-DD>
status: 'Planned'
tags: [<tags>]
---
# Plan: <ticket-id> — <Jira Summary>

## 1. Requirements Summary
<As before>
## 2. Codebase Analysis
<As before>
## 3. Chosen Solution
**Selected:** Solution <N> — <Short name>
**Decision:** <User chose this option / hybrid because … one short paragraph.>
### Implementation Phases
#### Phase 1: <Phase Title>
- **GOAL-001**: <Goal description>
| Task | Description | File(s) |
|------|-------------|---------|
| TASK-001 | <Atomic task description> | `path/to/file` |
#### Phase 2: <Phase Title>
…
## 4. Alternatives Not Selected
- **Solution X**: <One line what it was; why not chosen (reference user or trade-offs).>
## 5. Testing Strategy
| # | Test | Type | Description |
|---|------|------|-------------|
| TEST-001 | <Test name> | Unit | <What it verifies> |
## 6. Dependencies
- **DEP-001**: <Dependency description>
## 7. Risks & Assumptions
- **RISK-001**: <Risk and mitigation>
## 8. Files Affected
| # | File | Action | Description |
|---|------|--------|-------------|
| FILE-001 | `path/to/file` | Modify | <What changes> |
## 9. References
- Ticket: docs/<ticket-id>/<ticket-id>.md
# Progress: <ticket-id> — <Jira Summary>
> Last updated: <YYYY-MM-DD>
## Status: 🔵 Planned
(Status may be "Awaiting solution choice" before the user picks an option.)
Status legend: 🔵 Planned | 🟡 In Progress | 🟢 Completed | 🔴 Blocked
## Task Progress
| Task | Description | Status | Notes | Date |
|------|-------------|--------|-------|------|
| TASK-001 | <Description> | 🔵 | | |
## Evidence & Artefacts
| # | Artefact | Description | Path |
|---|----------|-------------|------|
| 1 | | | |
## Daily Log
### <YYYY-MM-DD>
- <What was done>
## Open Questions
- [ ] <Question 1>
## Decisions Made
| # | Decision | Rationale | Date |
|---|----------|-----------|------|
| 1 | Chose Solution <N> | User selection / team criteria | <date> |
When work is in progress, update docs/<ticket-id>/progress.md:
| Issue | Solution |
|-------|----------|
| Ticket doc not found | Run Step 1b (fetch Jira and write docs/<ticket-id>/<ticket-id>.md) or ensure the worktree path is correct |
| Plan seems incomplete | Re-run Step 3 with broader codebase scanning and deeper tracing |
| Too many tasks | Merge related tasks or split into multiple tickets |
| Requirements unclear | Add open questions to progress.md and discuss with the team |
| User wants a fourth option | Add only if it is a distinct optimized approach; otherwise refine the three or explain why options are exhausted |
| Only workarounds seem possible | Document as risk/mitigation and technical-debt follow-up; do not label workarounds as full "solutions" |
testing
Execute an existing Jira ticket implementation plan phase by phase. Use when asked to "work on ticket CM-1234", "implement the plan for CM-1234", "start working on the plan", or "execute the next phase". Reads the plan from docs/<ticket-id>/plan.md, captures a pre-implementation full test baseline in plan/progress docs, presents each phase for user approval before coding, updates progress after each phase, and operates inside the dedicated git worktree. After the last phase is committed, runs the full test suite, fixes regressions (skipping known pre-existing failures), then presents a full change summary for user review and creates a GitHub draft PR using the create-draft-pr skill.
tools
Generate a complete MCP server project in TypeScript with tools, resources, and proper configuration
tools
Use when starting work on a Jira ticket. Fetches ticket details via Atlassian MCP (for branch naming and a local story snapshot), creates an isolated git worktree with branch feature/<ticket-id>-<slug>-<platform>, and writes docs/<ticket-id>/<ticket-id>.md in the worktree.
development
Create new Agent Skills for GitHub Copilot from prompts or by duplicating this template. Use when asked to "create a skill", "make a new skill", "scaffold a skill", or when building specialized AI capabilities with bundled resources. Generates SKILL.md files with proper frontmatter, directory structure, and optional scripts/references/assets folders.