| name | lisa-linear-claim |
| description | Idempotently claims one live Linear leaf issue for direct Lisa work. Reuses linear-build-intake Phase 3b semantics through lisa-linear-access: configured ready-to-claimed state transition, assign-only-if-unassigned, stable managed comment, and post-write verification. |
| allowed-tools | ["Bash","Skill","Read"] |
Claim Linear Issue: $ARGUMENTS
Claim exactly one canonical Linear identifier such as ENG-123. All Linear access goes through lisa-linear-access. This is the reusable direct-session counterpart of lisa-linear-build-intake Phase 3b.
-
Resolve merged linear.workspace, linear.teamKey, and the Linear build-lifecycle roles from local-over-global config. Require the identifier's team key to equal the configured team. Resolve ready and claimed roles from linear.workflow (defaults Ready and In Progress); do not hardcode lifecycle decisions.
-
Invoke lisa-linear-read-issue <identifier> immediately before mutation. Reject a completed/canceled issue, active blocker, repo:<other> issue, any issue with open sub-Issues, or an Epic per repo-scope-split and leaf-only-lifecycle.
-
Inspect the Issue's live workflow state:
- Already claimed, review, environment-done, or another configured later non-terminal role -> preserve it and set
claim_outcome: reused.
- In the configured
ready state -> invoke lisa-linear-access operation: save-issue setting stateId to the claimed state (resolve state IDs with list-workflow-states; a missing state is a setup defect, never created here). This is the idempotency lock.
- In any OTHER non-terminal state -> reject. An Issue that is not in the
ready state has not been sanctioned for build, and absence of a lifecycle marker is no longer evidence of readiness: since the lane moved to states, every Issue always has one, so "no lifecycle label" is not a state this can observe.
- Terminal/completed -> reject; never regress completed work.
-
If and only if the Issue is unassigned, resolve the authenticated viewer and set its assigneeId through lisa-linear-access operation: save-issue. Leave an existing assignee untouched.
-
Post this stable comment once through lisa-linear-access operation: save-comment, deduped against all existing comments:
[lisa-tracker-claim] Claimed by Lisa. Starting implementation.
-
Invoke lisa-linear-read-issue <identifier> again. Success requires a non-terminal, current-repo leaf in claimed or a later non-terminal role. A failed state transition or failed verification is a hard failure and must not authorize a binding.
-
Return tracker_provider: linear, canonical work_item_ref: <IDENTIFIER>, claim_outcome: claimed|reused, assignee outcome, and the post-write status evidence.
Never create an Issue here. Never bypass lisa-linear-access.