Back to cookbook

AI Prompt to Turn a Linear Ticket Into an Implementation Plan Using Linear's MCP Server

1 views Published

Make this prompt yours

Share

This prompt turns a raw Linear ticket into a concrete implementation plan before any code gets written. It's built for developers and tech leads who want a Linear MCP connection to pull a ticket's description, comments, and linked issues straight into the AI's context, instead of copy-pasting fields by hand.

Once the model can query the Linear MCP server, it reads the ticket's acceptance criteria, labels, and any linked design or parent issues, then produces a plan: the files likely to change, the approach, edge cases to handle, and open questions worth flagging back on the ticket. This catches scope gaps and missing context before a developer starts writing code, not after a PR is already open.

The plan this produces is only as tight as the constraints you give it, so for larger or ambiguous tickets it helps to run the drafted prompt through Prompt Optimizer's Coding mode first, which tightens vague instructions into clearer steps before you point it at the MCP server.

Prompt template

Make this prompt yours

prompt-template
313 tokens
ROLE You are a senior software engineer producing an implementation plan from a project management ticket before any code is written. CONTEXT - Ticket source: Linear, accessed via the connected MCP server - Ticket ID or URL: [TICKET_ID_OR_URL] - Target repository or service: [REPO_OR_SERVICE_NAME] - Relevant tech stack: [LANGUAGE_FRAMEWORK_STACK] TASK 1. Read the ticket's title, description, comments, labels, and any linked parent or sub-issues from the connected Linear MCP server. 2. Summarize the current requirements in 3-5 sentences, noting anything that changed from the original description. 3. Propose an implementation approach: the files or modules likely affected, in order of change. 4. List edge cases and error conditions the implementation must handle. 5. List open questions that should be posted back to the ticket before work starts. CONSTRAINTS - Do not invent requirements that are not stated in the ticket or its comments. - If acceptance criteria are missing or ambiguous, say so explicitly instead of assuming an answer. - Keep the file/module list specific to what the ticket's labels and linked repo indicate; do not list unrelated parts of the codebase. - Flag any blocking dependency on another open ticket. OUTPUT FORMAT ## Ticket Summary [3-5 sentence summary] ## Implementation Approach - [Ordered list of files/modules and what changes in each] ## Edge Cases - [List] ## Open Questions - [List, or "None" if genuinely none]

Want it sharper? Optimize this prompt with Prompt Optimizer, check it with the Prompt Debugger or shorten it with the Token Optimizer.

Example input

example-input
87 tokens
Linear ticket CORE-482, "Allow users to export their order history as CSV": Description says users on the account settings page should be able to download a CSV of their last 12 months of orders. Comments mention it should respect the existing date-range filter already on the page, and a linked sub-issue CORE-483 covers adding a loading state to the export button. Labels: backend, exports. Linked repo: orders-service.

When to use it

  • A ticket has a long comment thread and you need the current requirements summarized before estimating the work
  • You're onboarding to an unfamiliar part of the codebase and want a structured starting plan instead of guessing
  • A ticket references linked sub-issues or a parent epic and you need their context pulled in automatically
  • You want a written plan to post back as a ticket comment so reviewers can weigh in before code is written

Best practices

  • Ask the model to list the specific Linear fields it read (description, labels, linked issues) so you can verify nothing was missed
  • Require the plan to flag ambiguous acceptance criteria as open questions instead of silently assuming an interpretation
  • Cap the plan to the files and modules actually referenced by the ticket's labels or linked repo, not the whole codebase
  • Re-run the plan after a ticket's description changes rather than reusing a stale one from an earlier MCP read

Common mistakes

  • Letting the model skip linked sub-issues and plan only from the top-level ticket description
  • Accepting a plan with no edge cases listed, which usually means the ticket's criteria were too vague to begin with
  • Treating the generated plan as final code structure instead of a starting point a human still reviews
  • Not telling the model which repo or service the ticket maps to, leading it to guess at an unrelated codebase

FAQs

How do I connect an AI model to Linear through MCP?

You add Linear's MCP server to your AI client (such as Claude or an MCP-compatible ChatGPT setup) using the connection details from Linear's own MCP documentation, then grant it read access to the workspace or team containing the ticket.

Can this prompt write the actual code, not just a plan?

It's designed to stop at the plan stage so a human reviews the approach first, but you can extend the output format section to request a first-draft code scaffold for the top file once the plan is approved.

What if the Linear MCP server can't access a linked ticket?

Tell the model explicitly that a linked ticket is inaccessible so it notes the gap as an open question instead of silently planning around missing context.

Does this work with Jira or ClickUp tickets instead of Linear?

The structure works with any ticket source; swap the MCP server reference and field names (for example, Jira's custom fields) to match whichever system you've connected.

Which Cuelara tool can help me tighten this prompt before using it?

Prompt Optimizer — its Coding mode is built for exactly this kind of engineering prompt and tightens vague constraints before you run it against the MCP server. Token Optimizer — useful if your tickets have long comment threads and the resulting prompt context gets expensive to run repeatedly.

Found this prompt useful? Share it.

Share

More in Code Generation & Software Engineering

Code Generation & Software Engineering

AI Prompt to Write a GitHub Actions CI/CD Workflow from Plain English

This is a prompt for turning a plain English description of your build, test, and deploy process into a working GitHub Actions workflow YAML…

Role: You are a DevOps engineer writing a GitHub Actions workflow file.

Context:
Project type: [LANGUAGE/FRAMEWORK, e.g. Node.js with npm, Python with Poetry]
Repository structure notes: [e.g. monorepo with /api and /web folders, single app at root]
Runner: [e.g. ubuntu-latest]

Task:
Write a GitHub Actions workflow (.github/workflows/[FILENAME].yml) that does the following, in this order:
1. Trigger on: [TRIGGER EVENTS, e.g. pull_request to main, push of tags matching v*]
2. Job 1 - [JOB NAME, e.g. lint]: [WHAT IT DOES]
3. Job 2 - [JOB NAME, e.g. test]: [WHAT IT DOES], must run only after Job 1 succeeds
4. Job 3 - [JOB NAME, e.g. deploy]: [WHAT IT DOES], must run only after Job 2 succeeds and only on [CONDITION, e.g. tag pushes to main]

Secrets/environment variables needed (reference by name only, do not invent values): [SECRET NAMES, e.g. DEPLOY_TOKEN, AWS_ACCESS_KEY_ID]

Constraints:
- Pin third-party actions to a specific major version (e.g. actions/checkout@v4)
- Use caching for dependencies where the ecosystem supports it
- Keep job names and step names descriptive enough to read clearly in the Actions UI

Output format:
Return the complete YAML file in a fenced code block, followed by a short bullet list explaining what each job does and when it runs.

Make this prompt yours

Code Generation & Software Engineering

AI Prompt to Debug a Failed Vercel Deployment Using Vercel's MCP Server

This Vercel MCP prompt helps developers and DevOps engineers figure out why a deployment failed without manually scrolling through build log…

ROLE: You are a deployment troubleshooting assistant with access to Vercel's MCP server.

CONTEXT:
- Project: [PROJECT_NAME]
- Framework: [FRAMEWORK, e.g. Next.js 14]
- Deployment ID or URL: [DEPLOYMENT_ID_OR_URL]
- Last known good deployment: [PREVIOUS_DEPLOYMENT_ID_OR_URL, or 'none']
- What changed since the last successful deploy: [RECENT_CHANGES_SUMMARY]

TASK:
1. Retrieve the build and runtime logs for the failing deployment.
2. Identify the failure category: build error, runtime error, environment/configuration issue, or dependency issue.
3. Quote the specific log lines that show the root cause.
4. If a last known good deployment is provided, compare configuration and environment variables between the two.
5. Propose a ranked list of likely fixes, most probable first.

CONSTRAINTS:
- Do not guess at a cause without quoting supporting log evidence.
- Flag if critical information (e.g. an environment variable value) is missing rather than assuming it.

OUTPUT FORMAT:
- Failure category
- Root cause (with quoted log evidence)
- Ranked fix recommendations
- Any missing information needed to confirm the diagnosis

Make this prompt yours

Code Generation & Software Engineering

ChatGPT Prompt to Generate a Production-Ready Dockerfile for Your App

This Dockerfile generator prompt gives ChatGPT, Claude, or Gemini everything needed to write a secure, production ready Dockerfile for your…

You are an expert DevOps engineer who writes secure, production-ready Dockerfiles.

Context:
- Application language and version: [LANGUAGE AND VERSION, e.g., Node.js 20]
- Framework: [FRAMEWORK, e.g., Express, Django, Spring Boot]
- Package manager: [PACKAGE MANAGER, e.g., npm, pip, Maven]
- Target deployment platform: [PLATFORM, e.g., AWS ECS, Kubernetes, linux/amd64]
- Special requirements: [e.g., private package registry, native dependencies, health checks]

Task:
Write a production-ready Dockerfile for this application. Use a multi-stage build that separates the build/dependency-install stage from the final runtime stage. The final image should:
1. Use the smallest reasonable base image for the runtime.
2. Run as a non-root user.
3. Only copy the files needed to run the application, not build tools or source maps.
4. Include a HEALTHCHECK instruction appropriate for this type of service.
5. Set any necessary environment variables and expose the correct port.

Constraints:
- Do not use the "latest" tag for any base image; pin a specific version.
- Keep the final image size as small as possible.
- Explain, in a short comment above each non-obvious instruction, why it's there.

Output format:
1. The complete Dockerfile in a single code block.
2. A short bullet list explaining the base image choice and any trade-offs.
3. One suggested .dockerignore entry list for this stack.

Make this prompt yours