Section

Agent Workflow — Neo-Brutalism

Brutalist agent execution stepper visualizing Plan, Search, Reason, Act, Reflect, Respond as a connected sequence. Hard black borders, offset shadows, and flat bright accents color each step by status. A Run button drives steps through pending → running → done on a timer with a filling progress bar and a live log line. Respects prefers-reduced-motion.

  • Section
  • Tailwind
  • HTML
  • MIT

Preview

Live section

Interactive preview
Open preview
9:41 100%
devsnips.dev/library/tailwind/sections/ai-product/agent-workflow/neo-brutalism/
fluid · no fixed width 100%
Dependencies: Tailwind CSS (CDN) · Google Fonts: Archivo, JetBrains Mono Responsive · Keyboard-ready · Reduced-motion

Install

Add to your project

terminal
npx devsnips add Tailwind/Sections/AI-Product/agent-workflow/neo-brutalism
registry path: Tailwind/Sections/AI-Product/agent-workflow/neo-brutalism

Source

Implementation

code.html
<!--
Snippet Name: Agent Workflow — Neo-Brutalism
Description: Hard-bordered agent execution stepper that animates Plan → Search → Reason → Act → Reflect → Respond through pending/running/done states with a filling connector and a Run button.
Author: DevSnips Contributors
Usage Example: Drop into any app shell as an agent run visualization. The Run button drives the steps through statuses on a timer.
-->
<div class="relative w-full max-w-3xl" data-workflow="nb">

  <!-- Panel -->
  <div class="border-2 border-black bg-white shadow-[8px_8px_0_0_#000]">

    <!-- Header -->
    <div class="flex flex-wrap items-center justify-between gap-3 border-b-2 border-black bg-[#FFE600] px-5 py-4">
      <div class="flex items-center gap-3">
        <div class="flex h-11 w-11 items-center justify-center border-2 border-black bg-white text-black shadow-[3px_3px_0_0_#000]">
          <svg class="h-6 w-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" aria-hidden="true">
            <circle cx="6" cy="6" r="2.4" />
            <circle cx="18" cy="6" r="2.4" />
            <circle cx="12" cy="18" r="2.4" />
            <path d="M7.6 7.6 10.6 16M16.4 7.6 13.4 16" />
          </svg>
        </div>
        <div>
          <p class="font-archivo text-base font-extrabold uppercase leading-none tracking-tight">Agent Run · #4827</p>
          <p class="mt-1 font-mono text-[11px] font-bold uppercase tracking-wider text-black/70">
            <span class="wf-status-dot inline-block h-2 w-2 border border-black bg-[#00E676]"></span>
            <span data-wf-status-label>IDLE · 6 STEPS</span>
          </p>
        </div>
      </div>
      <button type="button" data-wf-run class="flex items-center gap-2 border-2 border-black bg-black px-4 py-2 font-archivo text-sm font-extrabold uppercase tracking-tight text-white shadow-[4px_4px_0_0_#00E676] transition-transform duration-100 hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[1px_1px_0_0_#00E676] focus:outline-none focus-visible:ring-2 focus-visible:ring-[#00E676] focus-visible:ring-offset-2">
        <svg class="h-4 w-4" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M6 4l14 8-14 8V4z" /></svg>
        <span data-wf-run-label>RUN</span>
      </button>
    </div>

    <!-- Progress bar -->
    <div class="border-b-2 border-black bg-[#FFFDF5] px-5 py-4">
      <div class="flex items-center justify-between">
        <p class="font-mono text-[11px] font-bold uppercase tracking-wider text-black/60">PROGRESS</p>
        <p class="font-mono text-[11px] font-bold uppercase tracking-wider text-black/80" data-wf-count>0 / 6</p>
      </div>
      <div class="mt-2 h-5 w-full border-2 border-black bg-white">
        <div class="wf-progress h-full w-0 border-r-2 border-black bg-[#00E676] transition-[width] duration-300 ease-out" data-wf-progress></div>
      </div>
    </div>

    <!-- Steps -->
    <ol class="wf-steps divide-y-2 divide-black bg-[#FFFDF5]" data-wf-steps>
      <!-- steps injected by JS -->
    </ol>

    <!-- Footer / log -->
    <div class="border-t-2 border-black bg-black px-5 py-3">
      <p class="font-mono text-[11px] font-bold uppercase tracking-wider text-white/70">
        <span class="text-[#FFE600]">//</span> <span data-wf-log>Awaiting start.</span>
      </p>
    </div>
  </div>

  <style>
    [data-workflow="nb"] .wf-step { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px 20px; }
    [data-workflow="nb"] .wf-node { display: flex; align-items: center; justify-content: center; height: 44px; width: 44px; border: 2px solid #000; background: #fff; color: #000; transition: background-color .25s ease, color .25s ease; }
    [data-workflow="nb"] .wf-step[data-status="done"] .wf-node { background: #00E676; }
    [data-workflow="nb"] .wf-step[data-status="running"] .wf-node { background: #FFE600; animation: nb-pulse 1s infinite ease-in-out; }
    [data-workflow="nb"] .wf-step[data-status="pending"] .wf-node { background: #fff; }
    @keyframes nb-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,230,0,0); } 50% { box-shadow: 4px 4px 0 0 #000; } }
    [data-workflow="nb"] .wf-step[data-status="running"] .wf-title { color: #000; }
    [data-workflow="nb"] .wf-step[data-status="done"] .wf-title { color: #000; }
    [data-workflow="nb"] .wf-step[data-status="pending"] .wf-title { color: rgba(0,0,0,.5); }
    [data-workflow="nb"] .wf-pill { display: inline-block; border: 2px solid #000; padding: 2px 8px; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
    [data-workflow="nb"] .wf-step[data-status="done"] .wf-pill { background: #00E676; color: #000; }
    [data-workflow="nb"] .wf-step[data-status="running"] .wf-pill { background: #FFE600; color: #000; }
    [data-workflow="nb"] .wf-step[data-status="pending"] .wf-pill { background: #fff; color: rgba(0,0,0,.6); }
  </style>

  <script>
    (function () {
      var root = document.currentScript.closest('[data-workflow="nb"]');
      if (!root) return;

      var STEPS = [
        { id: 'plan', label: 'Plan', detail: 'Decompose goal into subtasks', icon: '<path d="M9 4h6a2 2 0 0 1 2 2v3M9 20h6a2 2 0 0 0 2-2v-3"/><rect x="4" y="8" width="6" height="5"/><path d="M10 10.5h4"/>' },
        { id: 'search', label: 'Search', detail: 'Retrieve context from tools', icon: '<circle cx="11" cy="11" r="6"/><path d="M20 20l-4-4"/>' },
        { id: 'reason', label: 'Reason', detail: 'Chain logic over evidence', icon: '<path d="M12 3v3M12 18v3M3 12h3M18 12h3"/><circle cx="12" cy="12" r="3.4"/>' },
        { id: 'act', label: 'Act', detail: 'Call tool: write_file()', icon: '<path d="M4 12h11M11 8l4 4-4 4"/><rect x="16" y="6" width="4" height="12"/>' },
        { id: 'reflect', label: 'Reflect', detail: 'Verify output vs goal', icon: '<path d="M4 6h16M4 12h10M4 18h7"/>' },
        { id: 'respond', label: 'Respond', detail: 'Stream final answer', icon: '<path d="M4 5h16v10H7l-3 3V5z"/>' }
      ];

      var ol = root.querySelector('[data-wf-steps]');
      var progress = root.querySelector('[data-wf-progress]');
      var countEl = root.querySelector('[data-wf-count]');
      var runBtn = root.querySelector('[data-wf-run]');
      var runLabel = root.querySelector('[data-wf-run-label]');
      var statusLabel = root.querySelector('[data-wf-status-label]');
      var statusDot = root.querySelector('.wf-status-dot');
      var logEl = root.querySelector('[data-wf-log]');

      var reduceMotion = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
      var tickMs = reduceMotion ? 0 : 1100;

      STEPS.forEach(function (s, idx) {
        var li = document.createElement('li');
        li.className = 'wf-step';
        li.setAttribute('data-step', s.id);
        li.setAttribute('data-status', 'pending');
        li.setAttribute('aria-label', 'Step ' + (idx + 1) + ' of ' + STEPS.length + ': ' + s.label + ', pending');
        li.innerHTML =
          '<div class="wf-node">' +
            '<svg class="h-5 w-5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" aria-hidden="true">' + s.icon + '</svg>' +
          '</div>' +
          '<div>' +
            '<p class="wf-title font-archivo text-[15px] font-extrabold uppercase tracking-tight">' + s.label + '</p>' +
            '<p class="mt-0.5 font-mono text-[11px] font-bold uppercase tracking-wider text-black/50">' + s.detail + '</p>' +
          '</div>' +
          '<span class="wf-pill">PENDING</span>';
        ol.appendChild(li);
      });

      var stepEls = Array.prototype.slice.call(ol.querySelectorAll('.wf-step'));
      var running = false;
      var timer = null;

      function setStatus(el, status) {
        el.setAttribute('data-status', status);
        var idx = stepEls.indexOf(el);
        el.setAttribute('aria-label', 'Step ' + (idx + 1) + ' of ' + STEPS.length + ': ' + STEPS[idx].label + ', ' + status);
        var pill = el.querySelector('.wf-pill');
        pill.textContent = status.toUpperCase();
      }

      function renderProgress(done) {
        var pct = (done / STEPS.length) * 100;
        progress.style.width = pct + '%';
        countEl.textContent = done + ' / ' + STEPS.length;
      }

      function setHeaderState(state) {
        var map = {
          idle: { dot: '#00E676', label: 'IDLE · 6 STEPS' },
          running: { dot: '#FFE600', label: 'RUNNING…' },
          done: { dot: '#00C2FF', label: 'COMPLETED' }
        };
        var m = map[state] || map.idle;
        if (statusDot) statusDot.style.background = m.dot;
        if (statusLabel) statusLabel.textContent = m.label;
      }

      function reset() {
        stepEls.forEach(function (el) { setStatus(el, 'pending'); });
        renderProgress(0);
        setHeaderState('idle');
        if (logEl) logEl.textContent = 'Awaiting start.';
      }

      function finish() {
        running = false;
        setHeaderState('done');
        if (runBtn) { runBtn.disabled = false; if (runLabel) runLabel.textContent = 'RUN AGAIN'; }
        if (logEl) logEl.textContent = 'Run complete. 6/6 steps succeeded.';
      }

      function run() {
        if (running) return;
        running = true;
        if (runBtn) runBtn.disabled = true;
        if (runLabel) runLabel.textContent = 'RUNNING';
        reset();
        setHeaderState('running');
        if (logEl) logEl.textContent = 'Starting agent run…';

        var i = 0;
        function next() {
          if (i > 0) {
            setStatus(stepEls[i - 1], 'done');
            if (logEl) logEl.textContent = 'Completed: ' + STEPS[i - 1].label;
            renderProgress(i);
          }
          if (i >= STEPS.length) { finish(); return; }
          setStatus(stepEls[i], 'running');
          if (logEl) logEl.textContent = 'Executing: ' + STEPS[i].label;
          i++;
          if (tickMs === 0) { next(); }
          else { timer = setTimeout(next, tickMs); }
        }
        next();
      }

      if (runBtn) runBtn.addEventListener('click', function () { if (timer) clearTimeout(timer); run(); });
      reset();
    })();
  </script>
</div>
194 lines UTF-8 · LF · Spaces: 2

AI-ready

Available to your agent.

This section is reachable through the DevSnips CLI, MCP server and Skills integrations — one registry, one resource path.

Resource path

devsnips://sections/ai-product/agent-workflow/neo-brutalism

Continue browsing

View all