orchestrate-jira-issue
Validates a Jira issue, runs a planning sub-session that produces Trellis tasks, then runs an implementation sub-session that opens a PR.
Usage
/orchestrate-jira-issue <issue_id>
If <issue_id> is not provided, ask for it with AskUserQuestion before proceeding.
Ordering Constraint (load-bearing)
Always arm a Monitor on s2cLogPath BEFORE calling any launch tool. The sub's first message (hello) is the only liveness signal — it is written immediately after the sub boots. Because tail -n 0 discards all lines written before the tail is armed, arming the Monitor even slightly after the launch call will silently miss the handshake, causing the conductor to hang waiting for a message that was already dropped.
Workflow
Phase 0 — Configuration check
Required keys: atlassianBaseUrl, atlassianCloudId, jiraProjectKey.
- Call
mcp__plugin_jira-issue-orchestration_issue-orchestration__get-config with no arguments.
- If any of
atlassianBaseUrl, atlassianCloudId, or jiraProjectKey is missing or empty in the returned values, stop with: Config missing or incomplete. Run /configure-jira-orchestration to set it up, then re-run this skill.
- Bind
CLOUD_ID ← atlassianCloudId for the getJiraIssue call in Phase 1.
Phase 1 — Initialization
Execute these steps in order; each is a prerequisite for the next.
Claim conductor channel
Call mcp__plugin_jira-issue-orchestration_issue-orchestration__claim-conductor, optionally passing label (e.g., the Jira issue key).
Store the returned channelId, c2sLogPath, and s2cLogPath. Hold channelId for the entire run — do not call claim-conductor again.
Arm persistent Monitor (must happen before any launch)
Start a persistent Monitor on s2cLogPath:
Monitor({ persistent: true, command: "tail -n 0 -F <s2cLogPath>" })
Do not proceed to the Jira fetch or any launch until this Monitor is running.
Validate Jira issue
Fetch the issue via mcp__plugin_atlassian_atlassian__getJiraIssue using the provided key.
If the issue status is Done, Cancelled, or Closed, stop and inform the user — do not proceed.
Phase 2 — Planning
Launch planning sub-session
Invoke conduct-orchestration-team --team-type planning --channel-id <channelId> --additional-instructions <issue_id> via the Skill tool, where <issue_id> is the Jira issue key from Phase 1.
conduct-orchestration-team manages the full planning sub lifecycle (launch → hello → instructions → done → terminate). Wait for it to return before proceeding.
Capture and verify the Trellis scope
Parse scope=<TRELLIS_ID> out of the planning sub's done message (forwarded by conduct-orchestration-team Step 5). Bind the value as TRELLIS_SCOPE. If the token is absent or empty, stop and inform the user — the planning sub failed its contract.
Confirm the root issue exists by calling mcp__plugin_task-trellis-teams_task-trellis__get_issue({ id: "<TRELLIS_SCOPE>" }). If get_issue returns no issue, stop and inform the user.
Confirm there is implementable work under it: call mcp__plugin_task-trellis-teams_task-trellis__list_issues({ scope: "<TRELLIS_SCOPE>", type: "task", status: ["open", "in-progress"] }) and check the result is non-empty (when the root itself is a task, get_issue is sufficient — skip the list_issues check). If no open tasks are found under a non-task root, stop and inform the user — do not launch the implementation sub.
Phase 3 — Implementation
The planning sub was already torn down by conduct-orchestration-team. The channel and Monitor remain live — proceed directly with the implementation launch.
Launch implementation sub-session
Invoke conduct-orchestration-team --team-type implementation --channel-id <channelId> --additional-instructions "<issue_id> scope=<TRELLIS_SCOPE>" via the Skill tool, where <issue_id> is the same Jira issue key from Phase 1 and <TRELLIS_SCOPE> is the root Trellis ID captured in Phase 2 step 2. Both values ride on a single line — do not embed newlines.
Wait for it to return.
Confirm PR and report to user
Run gh pr list --state open --limit 5 (via Bash) to confirm a PR was opened.
Report the PR URL to the user.
Phase 4 — Final Teardown
Call mcp__plugin_jira-issue-orchestration_issue-orchestration__stop-orchestration-team({ channelId }) to tear down the channel, remove IPC directories, and clean up. This is called exactly once, at the very end of the run.
Key Constraints
- No conductor agent type. This skill runs in the user's existing Claude Code session. Do not define a new agent type.
- Monitor before launch. Always follow the Phase 1 ordering: claim → arm Monitor → fetch Jira. Never call
launch-orchestration-team before the Monitor is armed.
- One channel for the full run.
claim-conductor is called exactly once (Phase 1). The channel survives between phases — conduct-orchestration-team tears down each sub on its way out, and stop-orchestration-team({ channelId }) is called only once at the very end.
- One sub at a time. Phases run sequentially. Never invoke
conduct-orchestration-team for a new sub before the previous phase has returned.
1---2name: orchestrate-jira-issue3description: Given a Jira issue key (e.g. ACME-1234), validates the issue then runs a planning sub-session (producing Trellis issues) followed by an implementation sub-session (opening a PR). Use when the user says "orchestrate", "run orchestration on", or "implement" a Jira issue via this plugin.4---56# orchestrate-jira-issue78Validates a Jira issue, runs a planning sub-session that produces Trellis tasks, then runs an implementation sub-session that opens a PR.910## Usage1112```13/orchestrate-jira-issue <issue_id>14```1516If `<issue_id>` is not provided, ask for it with `AskUserQuestion` before proceeding.1718## Ordering Constraint (load-bearing)1920**Always arm a `Monitor` on `s2cLogPath` BEFORE calling any launch tool.** The sub's first message (`hello`) is the only liveness signal — it is written immediately after the sub boots. Because `tail -n 0` discards all lines written before the tail is armed, arming the Monitor even slightly after the launch call will silently miss the handshake, causing the conductor to hang waiting for a message that was already dropped.2122## Workflow2324### Phase 0 — Configuration check2526Required keys: `atlassianBaseUrl`, `atlassianCloudId`, `jiraProjectKey`.27281. Call `mcp__plugin_jira-issue-orchestration_issue-orchestration__get-config` with no arguments.292. If any of `atlassianBaseUrl`, `atlassianCloudId`, or `jiraProjectKey` is missing or empty in the returned `values`, stop with: `Config missing or incomplete. Run /configure-jira-orchestration to set it up, then re-run this skill.`303. Bind `CLOUD_ID` ← `atlassianCloudId` for the `getJiraIssue` call in Phase 1.3132### Phase 1 — Initialization3334Execute these steps in order; each is a prerequisite for the next.35361. **Claim conductor channel** 37 Call `mcp__plugin_jira-issue-orchestration_issue-orchestration__claim-conductor`, optionally passing `label` (e.g., the Jira issue key). 38 Store the returned `channelId`, `c2sLogPath`, and `s2cLogPath`. Hold `channelId` for the entire run — do not call `claim-conductor` again.39402. **Arm persistent Monitor** _(must happen before any launch)_ 41 Start a persistent Monitor on `s2cLogPath`:4243 ```44 Monitor({ persistent: true, command: "tail -n 0 -F <s2cLogPath>" })45 ```4647 Do not proceed to the Jira fetch or any launch until this Monitor is running.48493. **Validate Jira issue** 50 Fetch the issue via `mcp__plugin_atlassian_atlassian__getJiraIssue` using the provided key. 51 If the issue status is Done, Cancelled, or Closed, stop and inform the user — do not proceed.5253### Phase 2 — Planning54551. **Launch planning sub-session** 56 Invoke `conduct-orchestration-team --team-type planning --channel-id <channelId> --additional-instructions <issue_id>` via the `Skill` tool, where `<issue_id>` is the Jira issue key from Phase 1. 57 `conduct-orchestration-team` manages the full planning sub lifecycle (launch → hello → instructions → done → terminate). Wait for it to return before proceeding.58592. **Capture and verify the Trellis scope** 60 Parse `scope=<TRELLIS_ID>` out of the planning sub's `done` message (forwarded by `conduct-orchestration-team` Step 5). Bind the value as `TRELLIS_SCOPE`. If the token is absent or empty, stop and inform the user — the planning sub failed its contract. 61 Confirm the root issue exists by calling `mcp__plugin_task-trellis-teams_task-trellis__get_issue({ id: "<TRELLIS_SCOPE>" })`. If `get_issue` returns no issue, stop and inform the user. 62 Confirm there is implementable work under it: call `mcp__plugin_task-trellis-teams_task-trellis__list_issues({ scope: "<TRELLIS_SCOPE>", type: "task", status: ["open", "in-progress"] })` and check the result is non-empty (when the root itself is a task, `get_issue` is sufficient — skip the `list_issues` check). If no open tasks are found under a non-task root, stop and inform the user — do not launch the implementation sub.6364### Phase 3 — Implementation6566The planning sub was already torn down by `conduct-orchestration-team`. The channel and Monitor remain live — proceed directly with the implementation launch.67681. **Launch implementation sub-session** 69 Invoke `conduct-orchestration-team --team-type implementation --channel-id <channelId> --additional-instructions "<issue_id> scope=<TRELLIS_SCOPE>"` via the `Skill` tool, where `<issue_id>` is the same Jira issue key from Phase 1 and `<TRELLIS_SCOPE>` is the root Trellis ID captured in Phase 2 step 2. Both values ride on a single line — do not embed newlines. 70 Wait for it to return.71722. **Confirm PR and report to user** 73 Run `gh pr list --state open --limit 5` (via `Bash`) to confirm a PR was opened. 74 Report the PR URL to the user.7576### Phase 4 — Final Teardown7778Call `mcp__plugin_jira-issue-orchestration_issue-orchestration__stop-orchestration-team({ channelId })` to tear down the channel, remove IPC directories, and clean up. This is called exactly once, at the very end of the run.7980## Key Constraints8182- **No conductor agent type.** This skill runs in the user's existing Claude Code session. Do not define a new agent type.83- **Monitor before launch.** Always follow the Phase 1 ordering: claim → arm Monitor → fetch Jira. Never call `launch-orchestration-team` before the Monitor is armed.84- **One channel for the full run.** `claim-conductor` is called exactly once (Phase 1). The channel survives between phases — `conduct-orchestration-team` tears down each sub on its way out, and `stop-orchestration-team({ channelId })` is called only once at the very end.85- **One sub at a time.** Phases run sequentially. Never invoke `conduct-orchestration-team` for a new sub before the previous phase has returned.