> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 将 PRD 转化为 Sprint 工单

export const UseCaseHero = ({title, description, prompt, category, features, devinUrl, agent, intent, playbookId, type}) => {
  const encodedPrompt = encodeURIComponent(prompt || '');
  const tag = 'docs-use-case-gallery';
  const utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=hero-cta';
  const agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  const devinHref = type === 'schedule' ? 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + (prompt ? '&prompt=' + encodedPrompt : '') : type === 'review' ? 'https://app.devin.ai/review?' + utm : agent === 'ada' ? 'https://app.devin.ai/search?' + utm + '&noSubmit=true' + (prompt ? '&prompt=' + encodedPrompt : '') : devinUrl ? devinUrl.includes('?') ? devinUrl + '&' + utm + agentParams : devinUrl + '?' + utm + agentParams : prompt ? 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encodedPrompt : 'https://app.devin.ai/?' + utm + agentParams;
  const buttonLabel = type === 'schedule' ? 'Schedule in Devin ↗' : type === 'review' ? 'Set Up Devin Review ↗' : agent === 'advanced' ? 'Try in Devin ↗' : agent === 'dana' ? 'Try in Dana ↗' : agent === 'ada' ? 'Try in Ask Devin ↗' : 'Try in Devin ↗';
  const featureList = features ? features.split(',').map(f => f.trim()) : [];
  return <div className="uc-hero">
      <div className="uc-hero-inner">
        <div className="uc-hero-left">
          <h1 className="uc-hero-title">{title}</h1>
          <p className="uc-hero-desc">{description}</p>
          <div>
            <a href={devinHref} target="_blank" rel="noopener noreferrer" className="try-in-devin-btn">
              {buttonLabel}
            </a>
          </div>
        </div>
        <div className="uc-hero-meta">
          <div className="uc-meta-item">
            <span className="uc-meta-label">Author</span>
            <span className="uc-meta-value">Cognition</span>
          </div>
          <div className="uc-meta-item">
            <span className="uc-meta-label">Category</span>
            <span className="uc-meta-value">{category}</span>
          </div>
          {featureList.length > 0 && <div className="uc-meta-item">
              <span className="uc-meta-label">Features</span>
              <span className="uc-meta-value">{featureList.join(', ')}</span>
            </div>}
        </div>
      </div>
    </div>;
};

export const PromptBlock = ({children, type, agent, intent, playbookId}) => {
  var utm = 'utm_source=docs&utm_medium=use-case-gallery&utm_campaign=prompt-block';
  var tag = 'docs-use-case-gallery';
  var agentParams = (agent ? '&agent=' + agent : '') + (intent ? '&intent=' + intent : '') + (playbookId ? '&playbookId=' + playbookId : '');
  var label = type === 'schedule' ? 'Schedule in Devin' : type === 'playbook' ? 'Create Playbook' : type === 'knowledge' ? 'Add to Knowledge' : agent === 'advanced' ? 'Try in Devin' : agent === 'dana' ? 'Try in Dana' : agent === 'ada' ? 'Try in Ask Devin' : 'Try in Devin';
  var buildUrl = function (text) {
    var encoded = encodeURIComponent(text);
    if (type === 'schedule') return 'https://app.devin.ai/settings/schedules/create?' + utm + agentParams + '&prompt=' + encoded;
    if (type === 'playbook') return 'https://app.devin.ai/settings/playbooks/create?' + utm + '&body=' + encoded;
    if (type === 'knowledge') return 'https://app.devin.ai/knowledge?' + utm + '&body=' + encoded;
    if (agent === 'ada') return 'https://app.devin.ai/search?' + utm + '&noSubmit=true&prompt=' + encoded;
    return 'https://app.devin.ai/?tags=' + tag + '&' + utm + agentParams + '&prompt=' + encoded;
  };
  const ref = React.useRef(null);
  const [href, setHref] = React.useState('#');
  React.useEffect(() => {
    if (!ref.current) return;
    var codeEl = ref.current.querySelector('pre code');
    if (codeEl) {
      var text = codeEl.textContent.trim();
      if (text) setHref(buildUrl(text));
    }
    var header = ref.current.querySelector('[data-component-part="code-block-header"]');
    if (header && !header.querySelector('.prompt-block-devin-link')) {
      var link = document.createElement('a');
      link.href = href;
      link.target = '_blank';
      link.rel = 'noopener noreferrer';
      link.className = 'prompt-block-devin-link';
      link.style.cssText = 'display:inline-flex;align-items:center;gap:6px;text-decoration:none;color:#fff;font-size:11px;font-weight:500;padding:4px 10px;border-radius:6px;white-space:nowrap;background:#317CFF;transition:background 0.2s;margin-left:8px;';
      link.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15 3 21 3 21 9"/><line x1="10" y1="14" x2="21" y2="3"/></svg> ' + label;
      link.onmouseenter = function () {
        link.style.background = '#2968D9';
      };
      link.onmouseleave = function () {
        link.style.background = '#317CFF';
      };
      header.appendChild(link);
    }
    var existingLink = ref.current.querySelector('.prompt-block-devin-link');
    if (existingLink && href !== '#') existingLink.href = href;
  });
  return <div className="prompt-block" ref={ref}>{children}</div>;
};

<UseCaseHero title="将 PRD 转化为 Sprint 工单" description="将 Devin 指向一个 Notion PRD，为每个工作包生成范围清晰的 Linear 工单。" prompt="阅读这个 Notion 页面中的 PRD：[粘贴 Notion URL]。调查我们的代码库以理解当前架构，然后将项目拆分为相互独立的工作包。针对每个工作包，在 Linear 中创建一个工单，包含描述、验收标准、复杂度预估（S/M/L）以及需要修改的文件列表。" category="项目管理" features="Integrations, MCP" />

<div className="uc-detail-wrapper">
  <Tip>不想手动设置？将此页面链接粘贴到 Devin 会话中，让它为你完成所有设置。</Tip>

  <Steps>
    <Step title="连接 Notion 和 Linear">
      Devin 使用 [Notion MCP](/zh/work-with-devin/mcp) 直接从 Notion 中读取你的 PRD。前往 **Settings > Connections > MCP servers**，找到 **Notion**，然后点击 **Enable**。系统会提示你授权访问 Notion 工作区 — 请授予对存放你 PRD 的工作区的只读访问权限。

      你的 [Linear 集成](/zh/integrations/linear) 也需要连接。前往 **Settings > Connections > Linear** 并点击 **Connect**，然后选择 Devin 应该在哪些团队下创建工单。连接完成后，Devin 会自动获得对 Linear 的原生支持 — 无需单独的 Linear MCP。
    </Step>

    <Step title="将 Devin 指向你的 PRD">
      分享 Notion 页面 URL，并告诉 Devin 工单应该如何具体组织。请明确说明 Linear 项目名称、工单格式以及任何团队约定。

      <PromptBlock>
        ```txt PRD to tickets theme={null}
        阅读这个 Notion 页面中的 PRD：
        https://notion.so/yourteam/user-profiles-v2-abc123

        调查我们的代码库以了解当前的用户资料架构，
        然后将该项目拆分为相互独立的工作包。

        针对每个工作包，在 "User Profiles V2" 项目中创建一个 Linear 工单，包含：
        - 对改动及其必要性的清晰说明
        - 验收标准
        - 复杂度预估（S/M/L）
        - 可能需要修改的文件列表

        按推荐的实施顺序对工单排序，并标注它们之间的依赖关系。
        ```
      </PromptBlock>

      如果你的团队遵循特定的工单模板，请将其添加为一个 [Knowledge](/zh/product-guides/knowledge) 条目，而不是在每个提示中重复它。比如：“所有工程工单必须包括：Description、Acceptance Criteria、Technical Notes 和 T-shirt size estimate。”Devin 会在每个会话中自动应用 Knowledge。
    </Step>

    <Step title="审查工单拆分结果">
      Devin 通过 Notion MCP 读取完整 PRD，在你的代码库中搜索并映射相关架构，然后创建限定在独立代码边界内的 Linear 工单。它会发布类似这样的摘要：

      | Ticket | 标题                                         | 大小 | 依赖关系   |
      | ------ | ------------------------------------------ | -- | ------ |
      | UP-101 | 为 `/api/users/avatar` 添加 avatar 上传端点       | S  | 无      |
      | UP-102 | 在 `src/pages/settings/profile` 中创建个人资料设置页面 | M  | 无      |
      | UP-103 | 迁移 `users` 表以支持简介和社交链接                     | M  | 无      |
      | UP-104 | 构建个人资料预览卡片组件                               | S  | UP-103 |
      | UP-105 | 为个人资料设置添加公开/私有可见性切换                        | M  | UP-103 |
      | UP-106 | 在 Elasticsearch 中索引新的个人资料字段以支持用户搜索         | L  | UP-103 |

      每个 Linear 工单都包含验收标准、文件路径和实现说明，这些内容都来自实际的 PRD 和代码库，而不是泛泛的描述。
    </Step>

    <Step title="优化并启动实现">
      在 Linear 中审查这些工单。如果有工单范围过大，可以让 Devin 将其拆分。当你准备好时，可以在 Linear 中将 Devin 分配给这些工单以开始实现，或者添加 `!implement` 标签以使用默认实现 playbook。

      <PromptBlock playbookId="b6ba73c577084d2392720a2abf51dc26">
        ```txt Implement a ticket theme={null}
        实现工单 UP-101：为 /api/users/avatar 添加 avatar 上传端点。
        遵循该工单中的验收标准。完成后打开一个 PR。
        ```
      </PromptBlock>
    </Step>
  </Steps>
</div>
