home / skills / shotaiuchi / dotclaude / wf0-promote

This skill promotes a local workflow to GitHub or Jira by extracting kickoff details and creating a tracked external issue.

npx playbooks add skill shotaiuchi/dotclaude --skill wf0-promote

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.9 KB
---
name: wf0-promote
description: ローカルワークフローをGitHub IssueまたはJiraに昇格
argument-hint: "<github | jira> [work-id]"
---

**Always respond in Japanese.**

# /wf0-promote

Promote a local workflow to GitHub Issue or Jira ticket.

## Usage

```
/wf0-promote github [work-id]
/wf0-promote jira [work-id]
```

## Arguments

- `github` / `jira`: Target platform
- `work-id`: Optional. Uses active work if omitted.

## Prerequisites

- github: `gh` CLI authenticated
- jira: `jira-cli` recommended, or manual input

## Processing

### 1. Validate

Get work from state.json. Error if `source.type` is not `"local"`. Require `01_KICKOFF.md` exists.

### 2. Extract Kickoff Info

From `01_KICKOFF.md`: Title (from state.json), Goal section, Success Criteria section.

### 3. Create External Issue

**GitHub:**
- Create issue via `gh issue create` with title, body (Goal + Success Criteria + local workflow reference)
- Auto-assign label from work type: FEAT→enhancement, FIX→bug, RFC→rfc
- Extract issue number/URL from result

**Jira:**
- Get project/domain from `.wf/config.json` or `JIRA_PROJECT`/`JIRA_DOMAIN` env vars
- Create via `jira-cli` if available, otherwise prompt for manual creation
- Record ticket ID and URL

### 4. Update state.json

Update `source`: set type to github/jira, record id, url, `promoted_from: "local"`, `promoted_at` timestamp.

### 5. Update 01_KICKOFF.md

Update Issue reference line in header.

### 6. Optional: Rename Work-ID

Ask user if they want to update work-id to include the issue number (e.g., `FEAT-myid-...` → `FEAT-123-...`).
If yes: rename docs directory, update state.json key, optionally rename git branch.

### 7. Commit

`docs(wf): promote <work-id> to <target_type>`

## Notes

- Only works with `source.type: "local"` workflows
- Preserves existing kickoff content
- Records promotion history in state.json
- GitHub labels auto-assigned by work type

Overview

This skill promotes a local workflow into an external tracking ticket on GitHub Issues or Jira. It extracts core kickoff data, creates the external issue or ticket, updates local metadata and docs, and optionally renames the work-id and git branch to reflect the new external reference. The goal is a safe, auditable promotion that preserves original kickoff content and records promotion history.

How this skill works

The skill validates that the workflow is local and that 01_KICKOFF.md exists, then extracts the Title, Goal, and Success Criteria. For GitHub it uses the gh CLI to create an issue, applying a label based on work type; for Jira it uses jira-cli or guides a manual creation. After creation it updates state.json, patches the kickoff header with the external link, and offers to rename the work-id and branch before committing the changes.

When to use it

  • You have a completed local workflow that should be tracked externally as an issue or ticket.
  • You want kickoff contents (Goal, Success Criteria) carried into an external issue body automatically.
  • You need to record promotion metadata and keep local docs synced with the external reference.
  • You prefer automated label mapping (FEAT/FIX/RFC → enhancement/bug/rfc) when creating GitHub issues.
  • You want an option to rename the local work-id and git branch to include the external id.

Best practices

  • Ensure state.json.source.type is set to "local" before promoting.
  • Keep a complete 01_KICKOFF.md with Goal and Success Criteria sections to populate the issue body cleanly.
  • Authenticate gh CLI for GitHub and configure jira-cli or set JIRA_PROJECT/JIRA_DOMAIN for Jira beforehand.
  • Review the suggested issue title and body before creation, and confirm any manual Jira steps if jira-cli is unavailable.
  • Run the promotion from the repo root so path expectations and state.json updates apply correctly.

Example use cases

  • Promote a completed feature workflow to a GitHub Issue so product and stakeholders can track implementation.
  • Convert a local bug workflow into a GitHub issue with the bug label and an issue URL recorded in state.json.
  • Create a Jira ticket from a local RFC workflow when the project uses Jira for formal reviews and approvals.
  • Keep local documentation linked to the external ticket by updating 01_KICKOFF.md and committing the change.
  • Rename a work folder and branch to include the new issue number for clearer cross-references in PRs.

FAQ

What happens if state.json.source.type is not local?

The skill stops with an error; promotion only supports workflows whose source.type is "local."

Can I promote without gh or jira-cli installed?

GitHub requires an authenticated gh CLI to create issues automatically; Jira can use jira-cli or fall back to manual creation with prompts to record the ticket ID and URL.

Will the kickoff content be changed during promotion?

Kickoff content is preserved; only the kickoff header is updated to add the external issue/ticket reference.