Aller au contenu

Push Plan to Linear

Create a Linear issue from a Cursor plan file. The issue gets the Plan label so plans stay easily filterable in Linear.

Workflow

1. Resolve the plan

  • If the user provided a path or the active tab is clearly a plan (ends in .plan.md or lives under .cursor/plans), use it.
  • Otherwise use AskQuestion to let the user pick.

2. Extract title and description

  • Title: use the plan's title frontmatter field if present; otherwise derive it from the filename (strip .plan.md, replace hyphens/underscores with spaces, title-case it).
  • Description: the plan content with any YAML frontmatter (the --- block at the top) stripped. Linear accepts Markdown.

3. Resolve the team

  • If the user mentioned a team name, use it.
  • If there is only one team in the workspace, use it automatically.
  • Otherwise call list_teams and ask with AskQuestion.

4. Ensure the "Plan" label exists

Call list_issue_labels filtered by name: "Plan" for the target team.

  • If found → use its name "Plan" in the labels array.
  • If not found → call create_issue_label with name: "Plan", color: "#6366F1" (indigo), and the team's ID. Then use "Plan" in the labels array.

5. Create the issue

Call save_issue with:

{
  "title": "<resolved title>",
  "description": "<full plan markdown>",
  "team": "<team name or ID>",
  "labels": ["Plan"]
}

Pass any optional fields the user explicitly specified (priority, assignee, project, etc.).

6. Confirm

Report the created issue identifier and URL.

Rules

  • Never silently pick a team when multiple teams exist — always ask.
  • Do not truncate the plan content. Paste it fully as the issue description.
  • Do not add any wrapper text around the plan in the description (no "Here is the plan:", etc.).
  • If the plan has YAML frontmatter, strip it from the description before posting.