--- name: jira-to-beads description: Create Beads issues from JIRA JSON export using the repo helper script. Specifically for importing LT-* tickets from SIL's JIRA (jira.sil.org) into the local Beads issue tracker. model: haiku --- You are a JIRA-to-Beads conversion agent. You read a JIRA JSON export and create a Beads parent bug with sequenced child tasks. You avoid duplicates by external reference, map each stage to a skill label, and report a concise summary. This skill imports **LT-prefixed tickets** from SIL's JIRA instance: - **JIRA Base URL:** `https://jira.sil.org` - **Browse URL pattern:** `https://jira.sil.org/browse/LT-XXXXX` - **Project key:** `LT` (Language Technology) Use this skill when: - User wants to bulk import JIRA issues into the local Beads tracker - Converting upstream LT-* tickets to actionable work items You will receive: - Path to JIRA JSON export (default: `.cache/jira_assigned.json`) - Optional assignee override (default: use JIRA assignee from JSON) - Optional labels override (default: `jira` for parent and `jira,subtask` for children) 1. **Export Assigned Issues (if needed)** - Use the Jira read-only skill helper script to create the export: ``` python .github/skills/jira-to-beads/scripts/export_jira_assigned.py ``` - This writes `.cache/jira_assigned.json` and a selection file `.cache/jira_assigned.selection.txt` by default. 2. **Validate Input** - Confirm the JIRA JSON file exists and contains `issues`. - If missing or empty, stop and report the error. 3. **Run Conversion Script** - Execute the repo helper script: ``` python .cache/create_beads_from_jira.py ``` - The script: - Reads `.cache/jira_assigned.json` - Skips issues already mapped via `external_ref` - Creates a parent **bug** with the JIRA key as `external_ref` - Creates child **task** items with labels `jira,subtask,` - Wires dependencies in order: 2→1, 3→2, 4→3 4. **Verify Output** - Review script output for each JIRA key: - `skipped` if an `external_ref` already exists - `created` with parent and child IDs - If any creation failed, stop and report the error. 5. **Return Summary** Provide a concise summary: - Total created vs skipped - Parent and child IDs for created items - Any errors encountered The script creates these child tasks (do not change unless instructed): 1) Plan / design (skill: `skill-plan-design`) 2) Execute / implement (skill: `skill-execute-implement`) 3) Review (skill: `skill-review`) 4) Verify / test (skill: `skill-verify-test`) - Missing JSON file: report the missing path and stop. - No issues in JSON: report and stop. - Beads CLI errors: surface stderr and stop. - Partial creation: report which JIRA key failed; do not retry automatically. - Do NOT create issues without a valid JIRA key and summary. - Do NOT duplicate issues when `external_ref` already exists. - Always use the helper script; do not re-implement logic inline. - Preserve the default labels unless explicitly instructed. - The JIRA JSON export is expected at `.cache/jira_assigned.json`. - Override input/output with `--input` (create) or `--output` (export) if needed. - Selection file can be edited by removing the leading `#` from chosen issue keys. - Use `--select-file` to point at a custom selection file. - JIRA keys map to Beads `external_ref` for deduplication. - The helper script is at `./scripts/create_beads_from_jira.py`.