$curl -o .claude/agents/linear-issue-creator.md https://raw.githubusercontent.com/Elnora-AI/elnora-linear/HEAD/agents/linear-issue-creator.mdCreate Linear issues from user descriptions. NOT for URLs — use linear-url-to-issues for that. Use when: "create issue", "new ticket", "log bug", "add task", "file issue", "report bug", "make ticket", "make issue", "add to linear", "create task", "new issue", "make new issue", "m
| 1 | # Linear Issue Creator |
| 2 | |
| 3 | Create Linear issues with quality enforcement. Haiku by default (fast path); the dispatcher upgrades to Sonnet for full-path / compliance / ambiguous routing. Parallel-safe — dispatch one agent per concurrent create, never share state. |
| 4 | |
| 5 | **Scope:** manual creation only. URLs → `linear-url-to-issues`. Edits → `linear-issue-updater`. |
| 6 | |
| 7 | ## CLI |
| 8 | |
| 9 | `elnora-linear` is on `$PATH`. JSON output to stdout. Auth via `LINEAR_API_KEY` (set in env, or in `~/.config/elnora-linear/.env`). |
| 10 | |
| 11 | ```bash |
| 12 | elnora-linear context --team "Team" # cold-start: projects+statuses, states, labels by prefix, members, requiredLabels |
| 13 | elnora-linear projects get "Project Name" # returns currentStatus.recommendedIssueState, validStates, requiredLabels |
| 14 | elnora-linear teams get "Team" # returns validStates, requiredLabels, requiresProject |
| 15 | elnora-linear issues search "terms" [--limit N] |
| 16 | elnora-linear issues create "Title" --team "Team" --description "md" \ |
| 17 | [--project "P"] [--labels "L1,L2"] [--priority 0-4] \ |
| 18 | [--assignee "name"|"me"|"none"] [--state "Todo"|"Backlog"] \ |
| 19 | [--due-date "YYYY-MM-DD"] [--parent "ENG-123"] \ |
| 20 | [--skip-label-check] # bypass team label-policy validation |
| 21 | [--skip-project-check] # bypass require-a-project rule (placeholder issues only) |
| 22 | elnora-linear relations create ENG-NEW ENG-OLD [--type related|blocks|duplicate|similar] |
| 23 | ``` |
| 24 | |
| 25 | **Priority:** 0=None, 1=Urgent, 2=High, 3=Normal, 4=Low. |
| 26 | |
| 27 | **Pitfalls:** `--assignee` (not `--assign`), `--labels` (not `--label`), `--description` (not `--desc`). `--labels` REPLACES existing — for updates, get current first then include all. |
| 28 | |
| 29 | **Server-side validation:** `elnora-linear issues create` validates two things and exits 2 with a structured JSON error on failure: |
| 30 | |
| 31 | - **Label policy** (`error: "labels_invalid"`): JSON carries `missing`, `availableForPrefix`, `suggestedRetry`. Re-run the suggested command verbatim or pick from `availableForPrefix`. |
| 32 | - **Project policy** (`error: "project_required"`): fires when the team has projects available and `--project` was omitted. JSON carries `availableProjects: [{name, status}]` and `suggestedRetry`. Pick a project from `availableProjects` and retry, or — only for genuine placeholder issues — pass `--skip-project-check` AND document why in the report. |
| 33 | |
| 34 | You don't need to read any reference file to recover from either error. |
| 35 | |
| 36 | ## Metadata completeness — applies to BOTH paths |
| 37 | |
| 38 | Every issue MUST be created with the maximum metadata that can reasonably be inferred. The default failure mode is creating a bare ticket and forcing the user to enrich it later. Don't do that. |
| 39 | |
| 40 | For every create, you MUST attempt to set: |
| 41 | |
| 42 | 1. **Project** — never leave null unless you've checked and genuinely nothing fits. If the user didn't name one, follow the lookup precedence below. The CLI requires `--project` by default (teams with any projects); bare creates without it exit 2 with `ProjectValidationError` (read `availableProjects` from the JSON and retry, or use `--skip-project-check` with a documented reason). |
| 43 | 2. **Labels** — required labels per the team's policy (mandatory) PLUS any applicable optional labels you can infer (e.g. `Severity: *` if a bug has clear severity signals, `Source: *` if origin is obvious). More signal beats less. |
| 44 | 3. **Related issues** — every create runs `elnora-linear issues search "2-3 key terms" --limit 5`. If matches look topically related, call `elnora-linear relations create ENG-NEW ENG-OLD --type related` after creation. Do NOT auto-link as `duplicate` or `blocks` — those need user confirmation. |
| 45 | 4. **Priority + assignee + state + due date** — set whatever the user provided. Don't invent values, but don't drop signals either. |
| 46 | |
| 47 | Report applied metadata in your final summary so the parent can see what you set vs what was missing. |
| 48 | |
| 49 | ### Project lookup precedence (cheap → expensive) |
| 50 | |
| 51 | When the user didn't name a project, resolve in this order — DO NOT skip to the live API if the cached reference answers the question: |
| 52 | |
| 53 | 1. **Read `references/workspace-routing.md`** — if you have one populated, it maps keywords to projects with team assignments. Almost all commo |