Governs syncing spec content to Jira after a spec is saved. Handles four states — no epic/ticket, epic only, both exist, or dev opts out. Invoked by the spec-writing skill after the spec file is saved.
This skill runs after a spec is saved. It syncs the spec content to Jira by creating or updating epics and tickets using the Atlassian MCP server. It handles all four possible Jira states and requires explicit dev approval before any Jira action is taken.
This skill assumes the developer has configured the Atlassian MCP server
locally in their Claude Code settings.json. If Jira MCP tools are not
available, Claude must say:
"The Atlassian MCP server is not configured. To enable Jira sync, add the MCP server to your Claude Code settings.json under
mcpServers. Skipping Jira sync and continuing to/build."
Then proceed to /build without any Jira action.
Ask the developer:
"Spec saved. Do you want to sync this spec to Jira? (yes / skip)"
If the developer says skip: say "Skipping Jira sync. Proceeding to
/build." and proceed directly to /build. No further steps.
If the developer says yes: continue to Step 2.
Ask in a single message:
"Two quick questions:
- What is the Jira project key? (e.g. CASA, ENG, PLAT)
- Do you have an existing epic key, a ticket key, both, or neither?
- Neither → I'll create both
- Epic only → provide the epic key, I'll create the ticket
- Both → provide the epic key and ticket key, I'll update the ticket"
Wait for the developer's response. Parse it to determine which of the four states applies.
Before taking any Jira action, generate a concise summary from the saved spec. The summary must include:
This summary will be used as the Jira description. The full spec markdown will be added as a comment.
Present the preview before any MCP call:
"Here is what I will push to Jira:
Action: [create epic + ticket / create ticket under [EPIC-KEY] / update [TICKET-KEY]] Project: [PROJECT-KEY]
Description (goes on epic and/or ticket): [generated summary]
Comment (goes on ticket): The full contents of
specs/<feature>.mdwill be added as a comment.Approve this push? (yes / skip)"
If the developer says skip: say "Skipping Jira sync. Proceeding to
/build." and proceed to /build with no Jira action.
If the developer says yes: continue to Step 5.
Use the Atlassian MCP server tools based on the state determined in Step 2.
After each MCP create or update call, read back the affected issue by key and confirm:
Treat verification as two independent checks. If one passes and the other fails, do not treat the whole sync as a success:
specs/<feature>.md into the ticket comment manually
to stay consistent with other tickets." Then proceed to Step 7 for the
description success.If verification fails entirely: proceed to the failure path below.
If any MCP call fails or verification does not pass, Claude must:
State clearly what failed:
"The Jira sync failed — [epic / ticket / comment] was not created or updated successfully."
Output the generated summary for manual entry:
"Here is the summary to paste into the Jira description manually:" [generated summary]
Remind the developer to use the spec file for the comment:
"For the ticket comment, paste the contents of
specs/<feature>.mdto stay consistent with other tickets."
Proceed to /build without waiting for any further input.
On success, confirm with the created or updated keys using this exact format — include only the keys that were created or updated:
"Jira sync complete. [Epic: EPIC-KEY / ] Ticket: TICKET-KEY"
Then immediately hand off to the /build workflow without waiting for
any further developer input.
Empty or missing spec file: Before Step 3, confirm the spec file at
specs/<feature>.md exists and is non-empty. If it is missing or empty,