---
title: "Opportunity to delivery"
description: "Turn a backlog opportunity into a Deck Project with its evidence, then link the Project to a Linear project or a Jira epic."
url: "/docs/agents/workflows/opportunity-to-delivery"
---

This page is an agent-readable workflow for Deck. Humans can follow along. Coding agents should treat the steps as the source of truth.

# Opportunity to delivery — agent workflow

* **Use it when:** the user says "turn this opportunity into a project", "send this to Linear" or "get this into Jira".
* **Outcome:** one Deck Project holds the opportunity's evidence, has an owner and an overview, and links to one Linear project or Jira epic.
* **Needs:** Deck MCP. Any member with MCP access can use the Build write tools. The Linear or Jira link needs that integration to be connected. Only org admins connect integrations, in Settings → Integrations. Deck tools do not create Linear or Jira items.

## 1. Probe Deck MCP

Call `get_user_context`. This must be a real tool call.

* 401 Unauthorized: tell the user to connect Deck MCP in this client (Settings → Connections). Stop.
* No Deck tools: fetch and follow [https://docs.getdeck.io/docs/agents/getting-started/prompts/ai-pm.md](https://docs.getdeck.io/docs/agents/getting-started/prompts/ai-pm.md). Stop this workflow until the tools work.

## 2. Pick the opportunity

* The user named an opportunity: call `explore_opportunity_backlog` with its `opportunity_id`. To find the ID from a title, call `search_deck` with `query` and `types: ["opportunity"]`.
* The user did not name one: call `explore_opportunity_backlog` with no ID. Show the top 5 items with Deck's impact score and evidence count. Ask the user to pick one.

In the detail, read `brief`, `evidence`, `segment_ids`, `linked_initiatives` and `linked_projects`.

If `linked_projects` already lists a Project, do not create a second one. Ask the user if they want to continue with that Project. If yes, call `explore_build_projects` with its `project_id` and go to step 5.

## 3. Draft the Project

Make these calls at the same time:

* `explore_workspace` with `view: "members"` and `query` set to the owner name that the user gives. Use the `user_id` of the match.
* `list_initiatives` with `query` set to a key word of the opportunity, when `linked_initiatives` is empty.

Show the user this draft:

* **Title:** a short outcome, for example "Bulk export for admins".
* **Description:** one or two sentences from the problem statement in the brief.
* **Owner:** the member from `explore_workspace`, or no owner.
* **Initiative:** the linked initiative, a match from `list_initiatives`, or none.
* **Segments:** the opportunity's `segment_ids`, or none.
* **Target date:** only a date that the user gives.

Get a yes before step 4.

## 4. Create the Project

Call `create_project` with `title`, `description` and `opportunity_id`. Add `initiative_id`, `owner_user_id`, `target_date` and `segment_ids` from the approved draft. The `opportunity_id` links the new Project to the opportunity and copies its evidence.

In a client that shows Deck views, you can call `create_from_insights` instead, with `action: "create_project"`, `title`, `opportunity_id` and `insight_ids`. Use the `source_id` of each evidence row with `source_type: "INSIGHT"`. This call saves nothing. The user must click **Create** in Deck's review. After the click, get the new Project from `linked_projects` in `explore_opportunity_backlog`. Then set the owner and the target date with `update_project`.

Call `explore_build_projects` with the new `project_id`. Make sure that `evidence.active_references` is not empty. If it is empty, call `add_project_insights` with the opportunity's insight IDs (the `source_id` of each evidence row with `source_type: "INSIGHT"`).

## 5. Write the overview and success metrics

Read the current sections in the `explore_build_projects` result. `update_project_section` replaces the whole section, so keep what the user wrote before.

* Call `update_project_section` with `section_key: "overview"`. Write the problem in the customers' words with 2 or 3 quotes from the evidence, and the scope (what is in and what is out).
* Call `update_project_section` with `section_key: "success_metrics"`. Write what must change in the feedback after the release, for example fewer negative insights in the linked theme.

`content` is an array of editor block nodes, with one `p` node for each paragraph. Plain text is rejected.

`generate_project_evidence_story` writes the Evidence section with Deck AI. It spends credits and replaces the Evidence section. Call it only after an explicit yes from the user, every time.

## 6. Link Linear or Jira

Call `explore_integrations` with `integration_type: "LINEAR"` or `"JIRA"`. If the state is not `active`, tell the user that an org admin connects it in Settings → Integrations. The Deck side is complete. Stop here.

Then pick one path:

* **The item exists:** ask for its URL. Deck accepts a Linear project URL or a Jira epic URL.
* **The item does not exist, option A:** give the user the Project `deck_url`. In Deck, the Project's external handoff menu creates a Linear project or a Jira epic and stores the link. See [Linear](/docs/integrations/linear) and [Jira](/docs/integrations/jira).
* **The item does not exist, option B:** if this client has its own Linear or Jira tools, draft the item from the Project overview. Show the draft, get a yes, and create the item with those tools.

Call `link_project_jira_or_linear` with `project_id`, `external_url` and `fetch_from_provider: true`. Deck reads the item and stores its title and key. Nothing changes in Linear or Jira. A Project has one Linear or Jira link, so a new link replaces the current one.

* `ALREADY_LINKED`: another Project holds the item. `details.linked_project_id` names that Project. Ask the user which Project keeps the link.
* `PROVIDER_NOT_CONNECTED`: the integration is not connected. See the check above.
* `PROVIDER_ARTIFACT_NOT_FOUND`: Deck cannot find the item. Ask the user for the URL again.

## 7. Confirm

Call `explore_build_projects` with `project_id`. Report the title, the owner, the evidence count, `external_links` and the `deck_url`.

## Rules

* One opportunity gets one Project, unless the user asks for more.
* Use only insight IDs that Deck returned. Never invent IDs.
* Do not change the opportunity. This workflow writes to the Project only.
* Quote Deck's numbers. Do not compute your own.
* Show the plan and get a yes before you call write tools. `generate_project_evidence_story` needs an explicit yes every time.
* Never ask for a `dk_` API key.

## Done when

* `explore_build_projects` shows the Project with evidence, an overview and success metrics.
* `explore_opportunity_backlog` with the `opportunity_id` lists the Project in `linked_projects`.
* The Project has one Linear or Jira link, or the user knows the next step to make the link.

See also: [Opportunity Backlog](/docs/features/opportunity-backlog), [Projects](/docs/features/projects) and [Model Context Protocol](/docs/integrations/mcp).

---

[View full sitemap](/docs/sitemap)
