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

# Weekly Dependency Update PRs

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="Weekly Dependency Update PRs" description="Schedule a weekly Devin session that finds outdated packages, runs your tests, and opens upgrade PRs." prompt="Check for outdated npm packages. Update all patch and minor versions in one PR — run the test suite and include a table of what changed. For any major version bumps, open a separate PR with breaking change notes from the changelog." category="Automations" features="Schedules" type="schedule" />

<div className="uc-detail-wrapper">
  <Tip>Don't want to set this up manually? Paste a link to this page into a Devin session and ask it to set everything up for you.</Tip>

  <Steps>
    <Step title="Create a weekly schedule">
      Open [app.devin.ai](https://app.devin.ai/?utm_source=docs\&utm_medium=use-case-gallery) and navigate to **Settings > Schedules**. Click **Create schedule** and configure it:

      * **Frequency:** Weekly — e.g., every Monday at 7:00 AM UTC (`0 7 * * 1`)
      * **Prompt:** Paste the dependency update prompt below

      <PromptBlock type="schedule">
        ```txt Weekly dependency update prompt theme={null}
        Check for outdated npm packages in the acme/frontend repo. For each:
        1. Update all patch and minor versions together in a single PR.
           Run the full test suite and include a summary table of changes.
        2. For each major version bump, open a separate PR with:
           - A summary of breaking changes from the package changelog
           - Any code modifications needed for compatibility
           - The updated lockfile
        3. Run `npm audit` and flag any packages with known vulnerabilities.
        ```
      </PromptBlock>

      If you use a [Playbook](/product-guides/creating-playbooks) for how your team handles dependency upgrades (e.g., always run `npm run build` after updating, or skip `devDependencies`), attach it to the schedule so every run follows the same process.
    </Step>

    <Step title="Add Knowledge to steer updates">
      Not every package should be updated automatically. Go to **Settings > Knowledge** and add entries that tell Devin what to skip or handle carefully:

      * `Do not update react past v18 — we're mid-migration to v19 on a separate branch.`
      * `Always pin @types/node to match our Node.js version (20.x).`
      * `Skip eslint-plugin-import — it conflicts with our custom lint config.`
      * `Our test command is npm run test:ci, not npm test.`

      These [Knowledge](/product-guides/knowledge) entries persist across every scheduled run, so Devin respects your constraints without you repeating them in the prompt.
    </Step>

    <Step title="Review what Devin delivers">
      Each Monday, Devin checks your repo for outdated packages and opens PRs on your behalf. A typical week might produce:

      **PR #1 — Safe updates (patch + minor):**

      ```
      ## Dependency Updates — Week of Feb 10

      | Package         | From    | To      | Type  |
      |-----------------|---------|---------|-------|
      | axios           | 1.6.2   | 1.6.8   | patch |
      | react-query     | 5.17.0  | 5.22.1  | minor |
      | tailwindcss     | 3.4.1   | 3.4.6   | patch |
      | typescript      | 5.3.3   | 5.3.5   | patch |

      All 847 tests passing. No vulnerabilities found by npm audit.
      ```

      **PR #2 — Major bump (separate, with notes):**

      ```
      ## Major Update: zod 3.x → 4.0.0

      Breaking changes (from CHANGELOG):
      - `z.object().strict()` is now the default behavior
      - `z.enum` requires at least one value
      - Removed deprecated `.check()` method

      Code changes in this PR:
      - Updated 3 schema files to remove explicit `.strict()` calls
      - Added fallback value to empty enum in src/schemas/status.ts
      ```

      Devin runs your test suite against each PR independently, so you can merge the safe batch immediately and take time reviewing the major bumps.
    </Step>

    <Step title="Iterate and expand">
      Once your weekly schedule is running, you can refine it over time. Reply to any scheduled session to give Devin follow-up instructions:

      <PromptBlock>
        ```txt Handle a major update theme={null}
        Go ahead with the zod v3 to v4 migration. Check the migration guide at
        https://zod.dev/v4 and update all schema files accordingly.
        ```
      </PromptBlock>

      <PromptBlock>
        ```txt Expand to backend deps theme={null}
        Also check for outdated Python packages in the acme/backend repo using pip.
        Update all compatible versions and open a separate PR. Run pytest before submitting.
        ```
      </PromptBlock>

      **Tips for keeping things smooth:**

      * **Separate frontend and backend** — If your repo has both, create two schedules so each PR stays focused and easy to review.
      * **Let CI run fully before merging** — Even safe-looking minor updates can introduce subtle bugs. Devin runs your tests, but your full CI pipeline adds another layer of confidence.
      * **Check the [Schedules](/product-guides/scheduled-sessions) page** to monitor run history, pause a schedule during a code freeze, or adjust the cron expression.
    </Step>
  </Steps>
</div>
