> ## 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.

# 週次 Knowledge の重複排除およびクリーンアップ

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="毎週の Knowledge の重複排除とクリーンアップ" description="月曜日に Devin セッションをスケジュールし、新しい提案をトリアージして重複エントリを統合し、矛盾するガイダンスを解消します。これにより、ナレッジベースを手作業なしで正確な状態に保てます。" prompt="直近 1 週間に寄せられたすべての Knowledge の提案を確認してください。重複を統合し、エントリ間の矛盾を解消し、古くなった提案は却下し、真に新しいものは明確なトリガー説明とともに取り込みます。その後、既存の Knowledge をスキャンし、非推奨パターンを参照しているエントリを探してください。" category="Devin の最適化" features="スケジュール, Advanced" type="schedule" agent="advanced" />

<div className="uc-detail-wrapper">
  <Tip>手動でのセットアップが面倒ですか？このページのリンクを Devin のセッションに貼り付けて、すべてをセットアップするよう依頼してください。</Tip>

  <Steps>
    <Step title="月曜日のクリーンアップ用プロンプトを作成する">
      1 週間を通してチームが Devin を使って作業していると、各セッションから [knowledge suggestions](/ja/product-guides/knowledge) が蓄積されていきます。Devin が学習したパターン、うまく動いたコマンド、見つけた規約などです。金曜日までには、名前が変わったファイルや非推奨になった API を参照している既存エントリに加えて、十数件の新しい提案が溜まっているかもしれません。毎週月曜日の定例の Devin セッションで、チームが週を始める前にこれらをすべて処理できます。

      プロンプトには、先週の提案のトリアージと既存エントリの重複排除という 2 つの作業を持たせます。両方に対応するプロンプトの例を以下に示します。

      <PromptBlock type="schedule" agent="advanced">
        ```txt Monday knowledge deduplication and cleanup theme={null}
        Review and maintain our knowledge base:

        1. Triage pending suggestions from the past week:
           - If new and useful, propose a knowledge entry with a specific trigger description
           - If it overlaps with an existing entry, propose merging into the existing one
           - If outdated or too vague, propose dismissing it
        2. Deduplicate and resolve conflicts in existing entries:
           - Find entries covering the same topic (e.g., two entries about Docker build steps) and propose consolidating into one
           - Identify entries giving contradictory advice (e.g., different pool sizes) and propose a resolution based on recency
           - Flag entries referencing old file paths, deprecated APIs, or removed packages
        ```
      </PromptBlock>

      各実行が完了したタイミングで通知を受け取れるよう、このスケジュール用の **Slack チャンネル** を設定します。Devin が提案された変更内容のサマリーをそこに投稿するので、チームはセッションを開かずにレビューできます。
    </Step>

    <Step title="月曜日の午前8時のスケジュールを作成する">
      Devin がナレッジ管理ツールにアクセスできるようにするには、[スケジュール済みセッション](/ja/product-guides/scheduled-sessions)が必要です。

      1. 左サイドバーの **Schedules** に移動するか、[app.devin.ai](https://app.devin.ai/?utm_source=docs\&utm_medium=use-case-gallery) のホームページにある入力ボックスのコンテキストメニューから **Schedule Devin** オプションを使用します
      2. **Create schedule** をクリックし、頻度をチームのタイムゾーンで **Weekly — every Monday at 8:00 AM** に設定します。これにより、新しい週が始まる前に、1 週間分の提案を処理できます
      3. 月曜日のクリーンアップ用プロンプトを貼り付けます
      4. Devin に新しいエントリのフォーマット方法や Knowledge フォルダの構成方法を標準化させたい場合は、必要に応じて[playbook](/ja/product-guides/creating-playbooks) を添付します

      Devin は、それぞれのスケジュール実行の開始時と完了時にメール通知を送信します。チームで [Slack integration](/ja/integrations/slack) を使用している場合、要約をチャンネルに直接投稿します。スケジューリングオプションの詳細については、[Scheduled Sessions guide](/ja/product-guides/scheduled-sessions) を参照してください。
    </Step>

    <Step title="最初の月曜日の実行を確認して承認する">
      最初の月曜日の実行が完了したら、セッションを開いて Devin の提案内容を確認します。**Devin は Knowledge の変更を自動的には適用しません** — 作成・マージ・削除を提案し、それぞれを手動で承認または却下します。通常のサマリーは次のようになります。

      ```
      Knowledge Deduplication & Cleanup — Monday, Feb 10

      Proposed new entries (3):
        - "Run prisma migrate deploy before integration tests" — from session #4821
        - "Redis cache TTL for user profiles is 5 minutes" — from session #4835
        - "Use vitest, not jest, for frontend unit tests" — from session #4802

      Proposed merges (2):
        - Consolidate "Docker build steps" + "Container build process" → single entry
        - Merge two overlapping entries about API error handling conventions

      Proposed removal (1):
        - "Bundle with webpack" — project migrated to Vite in December

      Proposed dismissals (4 suggestions):
        - Already covered by existing knowledge

      Conflict resolution (1):
        - Two entries disagreed on connection pool size (5 vs 10)
        - Recommends pool_size=10 based on the more recent performance tuning session
      ```

      各提案を確認し、そのセッション内で承認または却下します。最初の数回の実行は、調整のために使ってください。もしDevinが削除提案に踏み込みすぎているようであれば、プロンプトに次のようなメモを追加してください： *"迷う場合は削除を提案するのではなく、その項目を残したうえでレビュー対象としてフラグを付けてください。"*
    </Step>

    <Step title="毎月の監査で、より深く把握する">
      毎週月曜のクリーンアップが安定して回るようになったら、より深いメンテナンスのために、1〜2か月に一度、単発の Advanced Devin セッションで次のプロンプトを使ってください:

      <PromptBlock agent="advanced">
        ```txt 月次 Knowledge 陳腐化監査 theme={null}
        接続されているリポジトリの現在の状態と、すべての Knowledge エントリを突き合わせてください。名前が変更されたファイル、削除されたパッケージ、非推奨の API、古い規約を参照しているエントリにフラグを付けてください。陳腐化している各エントリについて、コードベースが現在実際に行っている内容に基づいた更新版を提案してください。
        ```
      </PromptBlock>

      <PromptBlock agent="advanced">
        ```txt Knowledge をフォルダーに再編成 theme={null}
        Knowledge ベースをフォルダーに再編成してください: "Backend", "Frontend",
        "DevOps", "Testing", "API Design"。既存のエントリを適切なフォルダーに移動し、
        トリガーの説明をより具体的なものになるように更新してください。
        ```
      </PromptBlock>

      **Tip:** 毎週月曜のスケジュールは、継続的な重複排除と提案のトリアージを処理します。これらのより深い監査――カバレッジギャップ分析とフォルダー再編成――は、1〜2か月に一度、手動で実行するのが最適なスポット的なタスクです。
    </Step>
  </Steps>
</div>
