Approve Discovery Synthesis
Arguments: $ARGUMENTS
Argument Parsing
Parse the arguments to extract:
{Synthesis_URL} - Confluence synthesis document URL (required)
{Decisions} - Optional pre-provided decision resolutions (via --decision=D1:OptionB)
Examples:
/approve-synthesis https://confluence/synthesis-doc → Review and approve interactively
/approve-synthesis https://confluence/synthesis-doc --decision=D1:B --decision=D2:Y → Pre-resolve decisions
Workflow Chain
/create-epic-discovery <epic-key> → Discovery Document
↓
[Manual research, interviews, experiments]
↓
/synthesize-discovery <doc-urls...> → Synthesis Document
↓
/approve-synthesis <synthesis-url> → Creates Jira Tickets (YOU ARE HERE)
↓
/create-implementation-plan <overview-doc> → Implementation planning continues
Phase 0: Context Retrieval
Fetch the synthesis document from {Synthesis_URL}
Extract from synthesis document:
- Discovery Epic link
- Target implementation epics
- Proposed tickets JSON (from Section 9, between
<!-- PROPOSED_TICKETS_START --> and <!-- PROPOSED_TICKETS_END --> markers)
- Blocking decisions and their status
- Approval status
FAILURE CONDITION - Invalid Synthesis Document:
If synthesis document cannot be fetched or lacks required sections:
STOP and prompt the user:
I was unable to retrieve the synthesis document or it is missing required data.
URL: {Synthesis_URL}
Issue: [document not found / missing Proposed Tickets section / invalid JSON]
Please verify:
1. The URL is correct and accessible
2. The document was created by /synthesize-discovery
3. The "Proposed Tickets Data" section (Section 9) exists
DO NOT PROCEED until valid document is provided.
FAILURE CONDITION - Already Approved:
If synthesis is already approved (approval_status: "approved"):
STOP and report:
This synthesis has already been approved.
Approved By: [user]
Approved Date: [date]
Tickets Created: [list]
Options:
A) View the created tickets
B) Create additional tickets (will append to existing)
C) Cancel
DO NOT PROCEED without user choice.
MANDATORY CHECKPOINT - Synthesis Overview:
## Synthesis Document Retrieved
**Discovery Epic:** {Discovery_Epic_Key}
**Synthesis Date:** [date]
**Sources Analyzed:** [count]
**Proposed Tickets:** [count] tickets, [sum] story points
**Target Epics:** [list epic keys]
**Blocking Decisions:** [count] pending / [count] total
Ready to review? (Yes / No)
DO NOT PROCEED without confirmation.
Phase 1: Decision Resolution
Check for unresolved blocking decisions:
Parse the blocking_decisions array from the JSON data.
Apply any pre-provided decisions from --decision arguments:
For each --decision=ID:Value:
- Validate the decision ID exists
- Validate the value is a valid option
- Mark as resolved
FAILURE CONDITION - Unresolved Blocking Decisions:
If any blocking decisions remain unresolved:
STOP and present each decision:
## Blocking Decisions Require Resolution
The following decisions must be resolved before tickets can be created:
### Decision D1: [Decision Question]
**Options:**
A) [Option A description]
B) [Option B description]
C) [Option C description]
**Recommendation:** [Option from synthesis]
**Rationale:** [Why this was recommended]
**Blocks Tickets:** T1, T3, T5
Please select an option: [A/B/C]
---
### Decision D2: [Decision Question]
...
DO NOT PROCEED until all decisions are resolved.
Record decision resolutions:
For each resolved decision:
- Record the chosen option
- Record resolver (user)
- Record timestamp
- Update affected tickets if decision changes scope
Phase 2: Ticket Review & Editing
Present proposed tickets for review:
## Proposed Tickets for Approval
All blocking decisions have been resolved. Review the tickets below.
### Epic: {Epic_Key_1} - {Epic_Title}
| # | ID | Title | Type | Points | Priority | Dependencies |
|---|-----|-------|------|--------|----------|--------------|
| 1 | T1 | [title] | Story | 5 | High | None |
| 2 | T2 | [title] | Task | 3 | Med | T1 |
### Epic: {Epic_Key_2} - {Epic_Title}
| # | ID | Title | Type | Points | Priority | Dependencies |
|---|-----|-------|------|--------|----------|--------------|
| 1 | T3 | [title] | Spike | 2 | High | None |
**Total:** [count] tickets, [sum] story points
---
**Options:**
- **Approve** - Create all tickets as shown
- **Edit** - Modify tickets before creation
- **Cancel** - Exit without creating tickets
What would you like to do? [Approve / Edit / Cancel]
If Edit selected:
## Edit Proposed Tickets
Available actions:
- **Add:** Add a new ticket (e.g., "Add Story 'Implement caching' to CC-62")
- **Remove:** Remove a ticket (e.g., "Remove T3")
- **Modify:** Change ticket details (e.g., "Modify T1 points to 8" or "Modify T2 priority to High")
- **Done:** Finish editing and review again
Current tickets:
[... ticket list ...]
Enter your changes (or "Done" to finish):
Editing loop:
- Parse user input for add/remove/modify commands
- Apply changes to proposed tickets
- Show updated list after each change
- Repeat until user says "Done"
- Return to approval checkpoint
MANDATORY CHECKPOINT - Final Ticket Approval:
## Final Ticket Approval
The following tickets will be created in Jira:
[... final ticket list with all edits applied ...]
**Total:** [count] tickets, [sum] story points
Create these tickets? (Yes / No)
DO NOT CREATE TICKETS without explicit "Yes" approval.
Phase 3: Ticket Creation
For each approved ticket:
Create ticket in Jira under the target epic:
Creating ticket: [title]
Epic: {Target_Epic}
Set ticket fields:
- Summary: [Title]
- Type: Story/Task/Bug/Spike
- Epic Link: {Target_Epic}
- Story Points: [estimated]
- Priority: [from synthesis]
- Labels:
from-discovery, {Discovery_Epic_Key}
Populate description using template:
## Source
- Discovery Epic: [{Discovery_Epic_Key}]({url})
- Synthesis Document: [{Synthesis_Doc}]({url})
- Based on Findings: [F1, F2, ...]
## Context
[Why this ticket was created based on discovery findings]
## Summary
[What this ticket accomplishes]
## Acceptance Criteria
- [ ] [Criterion from synthesis]
- [ ] [Criterion from synthesis]
## Notes from Discovery
- [Relevant insights that inform implementation]
- [Constraints or considerations discovered]
## Decisions Made
- D1: [Decision question] → [Resolution chosen]
---
*This ticket was generated from discovery synthesis. See source documents for full context.*
Link tickets:
- Link to discovery epic as "discovered by"
- Link dependencies between tickets using
jira_create_issue_link:
inward_issue_key = blocker, outward_issue_key = blocked
- See
atlassian-mcp/references/jira-queries.md > Issue Linking for full semantics
- Link to any relevant existing tickets
Track created tickets:
Maintain mapping: { T1: "CC-123", T2: "CC-124", ... }
FAILURE CONDITION - Ticket Creation Fails:
If any ticket creation fails:
## Ticket Creation Error
Failed to create ticket: [title]
Error: [error message]
**Tickets Created So Far:**
- CC-123: [title]
- CC-124: [title]
**Remaining Tickets:**
- [title] (failed)
- [title] (pending)
Options:
A) Retry failed ticket
B) Skip failed ticket and continue
C) Stop and save progress
What would you like to do? [A/B/C]
Phase 4: Update & Output
Update synthesis document in Confluence:
Add/update Section 10: Approved Tickets:
### 10. Approved Tickets
**Approval Date:** [timestamp]
**Approved By:** [user]
**Decisions Resolved:** [count]
#### Tickets Created
| Jira Key | Title | Type | Epic | Points |
|----------|-------|------|------|--------|
| [CC-123](url) | [title] | Story | CC-62 | 5 |
| [CC-124](url) | [title] | Task | CC-62 | 3 |
**Total:** [count] tickets, [sum] story points
#### Decision Resolutions
| Decision | Question | Resolution | Resolved By |
|----------|----------|------------|-------------|
| D1 | [question] | Option B | [user] |
#### Changes from Original Proposal
- Added: [list any added tickets]
- Removed: [list any removed tickets]
- Modified: [list any modified tickets]
Update JSON approval status in Section 9:
{
"approval_status": "approved",
"approved_by": "[user]",
"approved_date": "[timestamp]",
"created_tickets": {
"T1": "CC-123",
"T2": "CC-124"
}
}
Update discovery epic with:
- Link to synthesis document
- Summary of tickets created
Output
When complete, you MUST provide:
## Synthesis Approved - Tickets Created!
**Synthesis Document:** {Synthesis_URL} (updated)
### Decisions Resolved
| Decision | Resolution |
|----------|------------|
| D1 | [chosen option] |
| D2 | [chosen option] |
### Tickets Created
#### {Epic_Key_1}: {Epic_Title}
| Key | Title | Type | Points |
|-----|-------|------|--------|
| [CC-123](url) | [title] | Story | 5 |
| [CC-124](url) | [title] | Task | 3 |
#### {Epic_Key_2}: {Epic_Title}
| Key | Title | Type | Points |
|-----|-------|------|--------|
| [CC-125](url) | [title] | Spike | 2 |
**Total:** [count] tickets, [sum] story points
### Changes from Original Proposal
- Added: [list or "None"]
- Removed: [list or "None"]
- Modified: [list or "None"]
### Next Steps
1. Review created tickets in Jira
2. Run implementation planning:
/create-implementation-plan {Target_Epic_Overview_Doc}
Failure Conditions
| Condition |
Action |
| Synthesis URL not accessible |
Ask user to verify URL |
| Missing Proposed Tickets section |
Ask user to run /synthesize-discovery first |
| Invalid JSON in Proposed Tickets |
Report parsing error, ask for manual fix |
| Unresolved blocking decisions |
Present decisions for resolution, block ticket creation |
| Synthesis already approved |
Offer options: view, append, or cancel |
| Jira ticket creation fails |
Report error, offer retry/skip/stop options |
| Confluence update fails |
Provide content for manual update |
| Target epic not found |
Ask user to verify epic key |
Agent Delegation
Before ticket creation:
- Validation: Verify target epics exist and are accessible
- Decision Review: Ensure all blocking decisions are properly resolved
- Dependency Check: Validate ticket dependencies are consistent
During ticket creation:
- Parallel Creation: Create tickets in parallel where no dependencies exist
- Link Verification: Verify all Jira links are created correctly
1---2name: 2593-approve-synthesis-215d4d213description: Approve synthesis findings and create implementation tickets from discovery4---56# Approve Discovery Synthesis78**Arguments:** $ARGUMENTS910---1112## Argument Parsing1314Parse the arguments to extract:15- `{Synthesis_URL}` - Confluence synthesis document URL (required)16- `{Decisions}` - Optional pre-provided decision resolutions (via `--decision=D1:OptionB`)1718**Examples:**19- `/approve-synthesis https://confluence/synthesis-doc` → Review and approve interactively20- `/approve-synthesis https://confluence/synthesis-doc --decision=D1:B --decision=D2:Y` → Pre-resolve decisions2122---2324## Workflow Chain2526```27/create-epic-discovery <epic-key> → Discovery Document28 ↓29[Manual research, interviews, experiments]30 ↓31/synthesize-discovery <doc-urls...> → Synthesis Document32 ↓33/approve-synthesis <synthesis-url> → Creates Jira Tickets (YOU ARE HERE)34 ↓35/create-implementation-plan <overview-doc> → Implementation planning continues36```3738---3940## Phase 0: Context Retrieval41421. **Fetch the synthesis document** from `{Synthesis_URL}`43442. **Extract from synthesis document:**45 - Discovery Epic link46 - Target implementation epics47 - Proposed tickets JSON (from Section 9, between `<!-- PROPOSED_TICKETS_START -->` and `<!-- PROPOSED_TICKETS_END -->` markers)48 - Blocking decisions and their status49 - Approval status50513. **FAILURE CONDITION - Invalid Synthesis Document:**5253 If synthesis document cannot be fetched or lacks required sections:5455 **STOP and prompt the user:**56 ```57 I was unable to retrieve the synthesis document or it is missing required data.5859 URL: {Synthesis_URL}60 Issue: [document not found / missing Proposed Tickets section / invalid JSON]6162 Please verify:63 1. The URL is correct and accessible64 2. The document was created by /synthesize-discovery65 3. The "Proposed Tickets Data" section (Section 9) exists66 ```6768 **DO NOT PROCEED** until valid document is provided.69704. **FAILURE CONDITION - Already Approved:**7172 If synthesis is already approved (`approval_status: "approved"`):7374 **STOP and report:**75 ```76 This synthesis has already been approved.7778 Approved By: [user]79 Approved Date: [date]80 Tickets Created: [list]8182 Options:83 A) View the created tickets84 B) Create additional tickets (will append to existing)85 C) Cancel86 ```8788 **DO NOT PROCEED** without user choice.89905. **MANDATORY CHECKPOINT - Synthesis Overview:**9192 ```93 ## Synthesis Document Retrieved9495 **Discovery Epic:** {Discovery_Epic_Key}96 **Synthesis Date:** [date]97 **Sources Analyzed:** [count]9899 **Proposed Tickets:** [count] tickets, [sum] story points100 **Target Epics:** [list epic keys]101 **Blocking Decisions:** [count] pending / [count] total102103 Ready to review? (Yes / No)104 ```105106 **DO NOT PROCEED** without confirmation.107108---109110## Phase 1: Decision Resolution1111121. **Check for unresolved blocking decisions:**113114 Parse the `blocking_decisions` array from the JSON data.1151162. **Apply any pre-provided decisions** from `--decision` arguments:117118 For each `--decision=ID:Value`:119 - Validate the decision ID exists120 - Validate the value is a valid option121 - Mark as resolved1221233. **FAILURE CONDITION - Unresolved Blocking Decisions:**124125 If any blocking decisions remain unresolved:126127 **STOP and present each decision:**128 ```129 ## Blocking Decisions Require Resolution130131 The following decisions must be resolved before tickets can be created:132133 ### Decision D1: [Decision Question]134135 **Options:**136 A) [Option A description]137 B) [Option B description]138 C) [Option C description]139140 **Recommendation:** [Option from synthesis]141 **Rationale:** [Why this was recommended]142 **Blocks Tickets:** T1, T3, T5143144 Please select an option: [A/B/C]145146 ---147148 ### Decision D2: [Decision Question]149 ...150 ```151152 **DO NOT PROCEED** until all decisions are resolved.1531544. **Record decision resolutions:**155156 For each resolved decision:157 - Record the chosen option158 - Record resolver (user)159 - Record timestamp160 - Update affected tickets if decision changes scope161162---163164## Phase 2: Ticket Review & Editing1651661. **Present proposed tickets for review:**167168 ```169 ## Proposed Tickets for Approval170171 All blocking decisions have been resolved. Review the tickets below.172173 ### Epic: {Epic_Key_1} - {Epic_Title}174175 | # | ID | Title | Type | Points | Priority | Dependencies |176 |---|-----|-------|------|--------|----------|--------------|177 | 1 | T1 | [title] | Story | 5 | High | None |178 | 2 | T2 | [title] | Task | 3 | Med | T1 |179180 ### Epic: {Epic_Key_2} - {Epic_Title}181182 | # | ID | Title | Type | Points | Priority | Dependencies |183 |---|-----|-------|------|--------|----------|--------------|184 | 1 | T3 | [title] | Spike | 2 | High | None |185186 **Total:** [count] tickets, [sum] story points187188 ---189190 **Options:**191 - **Approve** - Create all tickets as shown192 - **Edit** - Modify tickets before creation193 - **Cancel** - Exit without creating tickets194195 What would you like to do? [Approve / Edit / Cancel]196 ```1971982. **If Edit selected:**199200 ```201 ## Edit Proposed Tickets202203 Available actions:204 - **Add:** Add a new ticket (e.g., "Add Story 'Implement caching' to CC-62")205 - **Remove:** Remove a ticket (e.g., "Remove T3")206 - **Modify:** Change ticket details (e.g., "Modify T1 points to 8" or "Modify T2 priority to High")207 - **Done:** Finish editing and review again208209 Current tickets:210 [... ticket list ...]211212 Enter your changes (or "Done" to finish):213 ```214215 **Editing loop:**216 - Parse user input for add/remove/modify commands217 - Apply changes to proposed tickets218 - Show updated list after each change219 - Repeat until user says "Done"220 - Return to approval checkpoint2212223. **MANDATORY CHECKPOINT - Final Ticket Approval:**223224 ```225 ## Final Ticket Approval226227 The following tickets will be created in Jira:228229 [... final ticket list with all edits applied ...]230231 **Total:** [count] tickets, [sum] story points232233 Create these tickets? (Yes / No)234 ```235236 **DO NOT CREATE TICKETS** without explicit "Yes" approval.237238---239240## Phase 3: Ticket Creation241242For each approved ticket:2432441. **Create ticket in Jira** under the target epic:245246 ```247 Creating ticket: [title]248 Epic: {Target_Epic}249 ```2502512. **Set ticket fields:**252 - Summary: [Title]253 - Type: Story/Task/Bug/Spike254 - Epic Link: {Target_Epic}255 - Story Points: [estimated]256 - Priority: [from synthesis]257 - Labels: `from-discovery`, `{Discovery_Epic_Key}`2582593. **Populate description using template:**260261```markdown262## Source263- Discovery Epic: [{Discovery_Epic_Key}]({url})264- Synthesis Document: [{Synthesis_Doc}]({url})265- Based on Findings: [F1, F2, ...]266267## Context268[Why this ticket was created based on discovery findings]269270## Summary271[What this ticket accomplishes]272273## Acceptance Criteria274- [ ] [Criterion from synthesis]275- [ ] [Criterion from synthesis]276277## Notes from Discovery278- [Relevant insights that inform implementation]279- [Constraints or considerations discovered]280281## Decisions Made282- D1: [Decision question] → [Resolution chosen]283284---285*This ticket was generated from discovery synthesis. See source documents for full context.*286```2872884. **Link tickets:**289 - Link to discovery epic as "discovered by"290 - Link dependencies between tickets using `jira_create_issue_link`:291 - `inward_issue_key` = **blocker**, `outward_issue_key` = **blocked**292 - See `atlassian-mcp/references/jira-queries.md > Issue Linking` for full semantics293 - Link to any relevant existing tickets2942955. **Track created tickets:**296297 Maintain mapping: `{ T1: "CC-123", T2: "CC-124", ... }`2982996. **FAILURE CONDITION - Ticket Creation Fails:**300301 If any ticket creation fails:302303 ```304 ## Ticket Creation Error305306 Failed to create ticket: [title]307 Error: [error message]308309 **Tickets Created So Far:**310 - CC-123: [title]311 - CC-124: [title]312313 **Remaining Tickets:**314 - [title] (failed)315 - [title] (pending)316317 Options:318 A) Retry failed ticket319 B) Skip failed ticket and continue320 C) Stop and save progress321322 What would you like to do? [A/B/C]323 ```324325---326327## Phase 4: Update & Output3283291. **Update synthesis document in Confluence:**330331 Add/update Section 10: Approved Tickets:332333 ```markdown334 ### 10. Approved Tickets335336 **Approval Date:** [timestamp]337 **Approved By:** [user]338 **Decisions Resolved:** [count]339340 #### Tickets Created341342 | Jira Key | Title | Type | Epic | Points |343 |----------|-------|------|------|--------|344 | [CC-123](url) | [title] | Story | CC-62 | 5 |345 | [CC-124](url) | [title] | Task | CC-62 | 3 |346347 **Total:** [count] tickets, [sum] story points348349 #### Decision Resolutions350351 | Decision | Question | Resolution | Resolved By |352 |----------|----------|------------|-------------|353 | D1 | [question] | Option B | [user] |354355 #### Changes from Original Proposal356357 - Added: [list any added tickets]358 - Removed: [list any removed tickets]359 - Modified: [list any modified tickets]360 ```3613622. **Update JSON approval status** in Section 9:363364 ```json365 {366 "approval_status": "approved",367 "approved_by": "[user]",368 "approved_date": "[timestamp]",369 "created_tickets": {370 "T1": "CC-123",371 "T2": "CC-124"372 }373 }374 ```3753763. **Update discovery epic** with:377 - Link to synthesis document378 - Summary of tickets created379380---381382## Output383384**When complete, you MUST provide:**385386```387## Synthesis Approved - Tickets Created!388389**Synthesis Document:** {Synthesis_URL} (updated)390391### Decisions Resolved392393| Decision | Resolution |394|----------|------------|395| D1 | [chosen option] |396| D2 | [chosen option] |397398### Tickets Created399400#### {Epic_Key_1}: {Epic_Title}401| Key | Title | Type | Points |402|-----|-------|------|--------|403| [CC-123](url) | [title] | Story | 5 |404| [CC-124](url) | [title] | Task | 3 |405406#### {Epic_Key_2}: {Epic_Title}407| Key | Title | Type | Points |408|-----|-------|------|--------|409| [CC-125](url) | [title] | Spike | 2 |410411**Total:** [count] tickets, [sum] story points412413### Changes from Original Proposal414- Added: [list or "None"]415- Removed: [list or "None"]416- Modified: [list or "None"]417418### Next Steps4191. Review created tickets in Jira4202. Run implementation planning:421422/create-implementation-plan {Target_Epic_Overview_Doc}423```424425---426427## Failure Conditions428429| Condition | Action |430|-----------|--------|431| Synthesis URL not accessible | Ask user to verify URL |432| Missing Proposed Tickets section | Ask user to run /synthesize-discovery first |433| Invalid JSON in Proposed Tickets | Report parsing error, ask for manual fix |434| Unresolved blocking decisions | Present decisions for resolution, block ticket creation |435| Synthesis already approved | Offer options: view, append, or cancel |436| Jira ticket creation fails | Report error, offer retry/skip/stop options |437| Confluence update fails | Provide content for manual update |438| Target epic not found | Ask user to verify epic key |439440---441442## Agent Delegation443444**Before ticket creation:**445446- **Validation:** Verify target epics exist and are accessible447- **Decision Review:** Ensure all blocking decisions are properly resolved448- **Dependency Check:** Validate ticket dependencies are consistent449450**During ticket creation:**451452- **Parallel Creation:** Create tickets in parallel where no dependencies exist453- **Link Verification:** Verify all Jira links are created correctly