<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 860" role="img" aria-label="Diagram loop perbaikan regression: trigger, siklus kerja, dan terminal state">
  <defs>
    <linearGradient id="bg" x1="0%" y1="0%" x2="0%" y2="100%">
      <stop offset="0%" stop-color="#0a1220"/>
      <stop offset="100%" stop-color="#060a12"/>
    </linearGradient>
    <filter id="glow" x="-60%" y="-60%" width="220%" height="220%">
      <feGaussianBlur stdDeviation="6" result="b"/>
      <feMerge>
        <feMergeNode in="b"/>
        <feMergeNode in="SourceGraphic"/>
      </feMerge>
    </filter>
    <marker id="arr" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M0,0 L10,5 L0,10 z" fill="#2dd4bf"/>
    </marker>
  </defs>

  <rect width="1200" height="860" fill="url(#bg)"/>
  <g stroke="#16202f" stroke-width="1">
    <path d="M0,215 H1200"/><path d="M0,430 H1200"/><path d="M0,645 H1200"/>
    <path d="M300,0 V860"/><path d="M600,0 V860"/><path d="M900,0 V860"/>
  </g>

  <!-- trigger -->
  <g transform="translate(600,78)">
    <rect x="-230" y="-42" width="460" height="84" rx="14" fill="#0d1626" stroke="#2dd4bf" stroke-width="3"/>
    <text y="-6" text-anchor="middle" font-family="'Segoe UI', system-ui, sans-serif" font-size="28" font-weight="600" fill="#f2f5f7">CI gagal / schedule harian</text>
    <text y="28" text-anchor="middle" font-family="ui-monospace, Consolas, monospace" font-size="19" letter-spacing="3" fill="#8b98a5">TRIGGER</text>
  </g>
  <path d="M600,120 V158 H300 V196" fill="none" stroke="#2dd4bf" stroke-width="4" stroke-linejoin="round" marker-end="url(#arr)"/>

  <!-- cycle boxes -->
  <g transform="translate(300,260)">
    <rect x="-210" y="-52" width="420" height="104" rx="14" fill="#0d1626" stroke="#22434e" stroke-width="2.5"/>
    <text y="-8" text-anchor="middle" font-family="'Segoe UI', system-ui, sans-serif" font-size="26" font-weight="600" fill="#f2f5f7">Kumpulkan bukti</text>
    <text y="26" text-anchor="middle" font-family="ui-monospace, Consolas, monospace" font-size="18" letter-spacing="2" fill="#8b98a5">COMMIT &#8226; LOG &#8226; STACK TRACE</text>
  </g>
  <g transform="translate(900,260)">
    <rect x="-210" y="-52" width="420" height="104" rx="14" fill="#0d1626" stroke="#22434e" stroke-width="2.5"/>
    <text y="-8" text-anchor="middle" font-family="'Segoe UI', system-ui, sans-serif" font-size="25" font-weight="600" fill="#f2f5f7">Worktree terisolasi + usulan fix</text>
    <text y="26" text-anchor="middle" font-family="ui-monospace, Consolas, monospace" font-size="18" letter-spacing="2" fill="#8b98a5">EXECUTOR</text>
  </g>
  <g transform="translate(900,470)">
    <rect x="-210" y="-52" width="420" height="104" rx="14" fill="#0d1626" stroke="#2dd4bf" stroke-width="3"/>
    <text y="-8" text-anchor="middle" font-family="'Segoe UI', system-ui, sans-serif" font-size="25" font-weight="600" fill="#f2f5f7">Verifikasi diff + gate deterministik</text>
    <text y="26" text-anchor="middle" font-family="ui-monospace, Consolas, monospace" font-size="18" letter-spacing="2" fill="#2dd4bf">TEST &#8226; LINT &#8226; SCOPE DIFF</text>
  </g>
  <g transform="translate(300,470)">
    <rect x="-210" y="-52" width="420" height="104" rx="14" fill="#0d1626" stroke="#22434e" stroke-width="2.5"/>
    <text y="-8" text-anchor="middle" font-family="'Segoe UI', system-ui, sans-serif" font-size="26" font-weight="600" fill="#f2f5f7">State + feedback</text>
    <text y="26" text-anchor="middle" font-family="ui-monospace, Consolas, monospace" font-size="17" letter-spacing="1" fill="#8b98a5">HYPOTHESIS &#8226; PERCOBAAN &#8226; HASIL TEST</text>
  </g>

  <!-- cycle arrows (clockwise) -->
  <path d="M510,260 H678" fill="none" stroke="#2dd4bf" stroke-width="4" marker-end="url(#arr)"/>
  <path d="M900,312 V411" fill="none" stroke="#2dd4bf" stroke-width="4" marker-end="url(#arr)"/>
  <path d="M690,470 H522" fill="none" stroke="#2dd4bf" stroke-width="4" marker-end="url(#arr)"/>
  <path d="M300,418 V319" fill="none" stroke="#2dd4bf" stroke-width="4" marker-end="url(#arr)"/>
  <text x="595" y="243" text-anchor="middle" font-family="ui-monospace, Consolas, monospace" font-size="17" letter-spacing="2" fill="#5b6b7a">COBA FIX</text>
  <text x="605" y="453" text-anchor="middle" font-family="ui-monospace, Consolas, monospace" font-size="17" letter-spacing="2" fill="#5b6b7a">ULANGI</text>

  <!-- exit arrow to terminal states -->
  <path d="M900,522 V590 H600 V636" fill="none" stroke="#2dd4bf" stroke-width="4" marker-end="url(#arr)"/>
  <text x="750" y="578" text-anchor="middle" font-family="ui-monospace, Consolas, monospace" font-size="17" letter-spacing="2" fill="#5b6b7a">SEMUA GATE DINILAI</text>

  <!-- terminal states -->
  <text x="600" y="672" text-anchor="middle" font-family="ui-monospace, Consolas, monospace" font-size="19" letter-spacing="4" fill="#8b98a5">TERMINAL STATE</text>
  <g font-family="ui-monospace, Consolas, monospace" font-size="19" font-weight="600" letter-spacing="1">
    <g transform="translate(180,725)">
      <rect x="-140" y="-30" width="280" height="60" rx="30" fill="#0f2723" stroke="#2dd4bf" stroke-width="3" filter="url(#glow)"/>
      <text y="7" text-anchor="middle" fill="#2dd4bf">DONE_WITH_EVIDENCE</text>
    </g>
    <g transform="translate(465,725)">
      <rect x="-105" y="-30" width="210" height="60" rx="30" fill="#0d1626" stroke="#5b6b7a" stroke-width="2.5"/>
      <text y="7" text-anchor="middle" fill="#8b98a5">BLOCKED</text>
    </g>
    <g transform="translate(715,725)">
      <rect x="-120" y="-30" width="240" height="60" rx="30" fill="#0d1626" stroke="#5b6b7a" stroke-width="2.5"/>
      <text y="7" text-anchor="middle" fill="#8b98a5">NEEDS_HUMAN</text>
    </g>
    <g transform="translate(1000,725)">
      <rect x="-140" y="-30" width="280" height="60" rx="30" fill="#0d1626" stroke="#5b6b7a" stroke-width="2.5"/>
      <text y="7" text-anchor="middle" fill="#8b98a5">BUDGET_EXCEEDED</text>
    </g>
  </g>

  <!-- only DONE opens a PR -->
  <path d="M180,755 V800" fill="none" stroke="#2dd4bf" stroke-width="4" marker-end="url(#arr)"/>
  <text x="205" y="826" font-family="'Segoe UI', system-ui, sans-serif" font-size="24" font-weight="600" fill="#f2f5f7">Buka pull request siap review</text>
</svg>
