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

# Convertir un hotfix de producción en un playbook

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="Convertir un hotfix en producción en un playbook" description="Extrae los pasos exactos de una sesión de respuesta a incidentes exitosa para que tu equipo pueda repetir la solución cada vez." prompt="La sesión del incidente de fuga de memoria del martes pasado fue de manual: Devin identificó la fuga en el pool de conexiones, aplicó la corrección, verificó en staging y desplegó sin tiempo de inactividad: [session link]. Extrae de ella un playbook reutilizable de corrección urgente para que los ingenieros de guardia puedan seguir el mismo proceso en futuros problemas de memoria." category="Devin Optimization" features="Advanced, Playbooks" agent="advanced" intent="create" />

<div className="uc-detail-wrapper">
  <Tip>¿No quieres configurar esto manualmente? Pega un enlace a esta página en una sesión de Devin y pídele que lo configure todo por ti.</Tip>

  <Steps>
    <Step title="Identificar la sesión de incidente que vale la pena capturar">
      Después de resolver un incidente en producción, tienes una transcripción de sesión de Devin que capturó cada paso de diagnóstico, cada comando ejecutado y cada decisión tomada bajo presión. Esa transcripción es la materia prima para un playbook que tu equipo de guardia puede reutilizar la próxima vez.

      No toda sesión de incidente es adecuada para un playbook. Busca sesiones en las que Devin siguió una metodología clara y repetible: el tipo de incidente que tu equipo ve con regularidad:

      * **Fugas de memoria**: identificó el origen, aplicó la corrección, verificó el uso del heap después del despliegue
      * **Agotamiento del pool de conexiones**: rastreó la causa raíz, ajustó la configuración del pool, añadió monitorización
      * **Timeouts en cascada**: aisló el upstream que fallaba, añadió circuit breakers, validó la recuperación
    </Step>

    <Step title="Crear el playbook">
      Abre la [página de inicio de Devin](https://app.devin.ai/?utm_source=docs\&utm_medium=use-case-gallery) e inicia una nueva sesión. Describe la sesión que quieres convertir en un playbook.

      Pega el enlace de la sesión de incidente y describe qué debe capturar el playbook. Sé específico sobre el **alcance de la generalización**: el playbook debe funcionar para la *clase* de incidente, no solo para el servicio concreto que falló.

      <PromptBlock agent="advanced" intent="create">
        ```txt Create hotfix playbook from incident session theme={null}
        This session diagnosed and fixed a memory leak in our payments service
        caused by unclosed database connections:
        https://app.devin.ai/sessions/abc123

        Create a reusable hotfix playbook for memory-leak incidents that any
        on-call engineer can attach to a new session. It should:
        - Generalize the diagnostic steps (not payments-specific)
        - Include the heap profiling approach from the session
        - Capture how it validated the fix in staging before deploying
        - Keep the rollback procedure in case the fix makes things worse
        - Add a step for posting a summary to the #incidents Slack channel
        ```
      </PromptBlock>

      Si tienes varios incidentes resueltos del mismo tipo (por ejemplo, dos sesiones diferentes de fuga de memoria), añádelos todos. Devin identifica patrones comunes entre sesiones y produce un [playbook](/es/product-guides/creating-playbooks) más sólido.
    </Step>

    <Step title="Probarlo en el siguiente incidente">
      La verdadera prueba es si el playbook funciona en una instancia *distinta* de la misma clase de incidente. Cuando aparezca el siguiente problema de memoria, inicia una nueva sesión de Devin, adjunta el playbook e indícale el servicio afectado.

      <PromptBlock>
        ```txt Diagnose memory leak in the notifications service theme={null}
        Use the attached hotfix playbook to investigate and fix a memory leak
        in the notifications service. OOM kills started at 03:12 UTC.
        The service is at src/services/notifications/.
        ```
      </PromptBlock>

      Si la sesión resuelve el incidente sin problemas, tu playbook se generaliza bien. Si tiene dificultades —quizá el patrón de fuga es diferente o el servicio usa un driver de base de datos distinto—, vuelve a introducir esa sesión en Devin y pídele que mejore el playbook. Consulta [Corregir un playbook de migración de BD inestable](/es/use-cases/gallery/improve-playbook-from-sessions) para ese flujo de trabajo.
    </Step>
  </Steps>
</div>
