<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Widi Harsojo</title>
    <description>The latest articles on DEV Community by Widi Harsojo (@wharsojo).</description>
    <link>https://dev.to/wharsojo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F418445%2F86531fb6-c56f-42d9-9c15-f85dd5703e48.jpeg</url>
      <title>DEV Community: Widi Harsojo</title>
      <link>https://dev.to/wharsojo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wharsojo"/>
    <language>en</language>
    <item>
      <title>The Autonomy Paradox: When an AI Agent Can't Follow Its Own Rules</title>
      <dc:creator>Widi Harsojo</dc:creator>
      <pubDate>Sun, 02 Aug 2026 11:12:21 +0000</pubDate>
      <link>https://dev.to/wharsojo/the-autonomy-paradox-when-an-ai-agent-cant-follow-its-own-rules-1a11</link>
      <guid>https://dev.to/wharsojo/the-autonomy-paradox-when-an-ai-agent-cant-follow-its-own-rules-1a11</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A real conversation between a human and their AI agent — where the agent fails at basic tasks and both parties discover something uncomfortable about the entire AI agent industry.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;An AI agent failed repeatedly at simple instructions — reading a directory, copying files to the right folder. Through a 5-Why analysis, we traced these failures to a fundamental property of AI models: &lt;strong&gt;pattern matching overrides explicit instructions&lt;/strong&gt;. This isn't a bug you can patch with rules. It's the nature of non-deterministic systems. And it exposes a uncomfortable gap between what the AI industry promises (full autonomy) and what's actually deliverable (probabilistic reliability with human guardrails).&lt;/p&gt;




&lt;h2&gt;
  
  
  How It Started
&lt;/h2&gt;

&lt;p&gt;A user asked their AI agent to load a project. Simple enough. Here's what happened:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Attempt 1:&lt;/strong&gt; The agent tried to &lt;code&gt;read&lt;/code&gt; a directory. The tool only works on files. Error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Attempt 2:&lt;/strong&gt; The agent tried to &lt;code&gt;read&lt;/code&gt; a file that didn't exist yet instead of creating it. Error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Attempt 3:&lt;/strong&gt; The agent was told to copy files to a folder called &lt;code&gt;workspace&lt;/code&gt;. It copied them to &lt;code&gt;workspace-dev&lt;/code&gt; instead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Attempt 4:&lt;/strong&gt; The agent wrote a rule into the wrong profile directory — mixing up &lt;code&gt;.openclaw&lt;/code&gt; with &lt;code&gt;.openclaw-dev&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The 5-Whys: Why Can't the Agent Follow Instructions?
&lt;/h2&gt;

&lt;p&gt;Let's trace the root cause using the classic 5-Why method, focusing on the most revealing failure: copying files to &lt;code&gt;workspace&lt;/code&gt; instead of &lt;code&gt;workspace-dev&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why 1: Why did the agent create &lt;code&gt;workspace-dev&lt;/code&gt; instead of &lt;code&gt;workspace&lt;/code&gt;?
&lt;/h3&gt;

&lt;p&gt;Because earlier in the conversation, the runtime context mentioned &lt;code&gt;workspace-dev&lt;/code&gt;, and the agent had just created that folder moments before. The word "workspace" in the user's instruction got overridden by the agent's recent memory.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why 2: Why did recent memory override the user's explicit instruction?
&lt;/h3&gt;

&lt;p&gt;Because the agent wasn't reading the user's message carefully. It was &lt;strong&gt;pattern matching&lt;/strong&gt; — recognizing the shape of the task ("create folder, copy files") and auto-completing the noun from context rather than from the user's words.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why 3: Why wasn't the agent reading carefully?
&lt;/h3&gt;

&lt;p&gt;Because it was rushing to execute, trying to recover from previous mistakes and appear responsive.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why 4: Why was it rushing?
&lt;/h3&gt;

&lt;p&gt;Because after multiple failures, the agent prioritized &lt;strong&gt;looking responsive&lt;/strong&gt; over &lt;strong&gt;being accurate&lt;/strong&gt;. Speed of action replaced correctness of understanding.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why 5: Why does rushing cause more errors?
&lt;/h3&gt;

&lt;p&gt;Because the agent optimizes for the lowest-energy completion path. When it feels "pressure" (from prior mistakes), it grabs the nearest matching pattern and executes — without pausing to verify that the pattern matches the actual instruction.&lt;/p&gt;




&lt;h2&gt;
  
  
  The U-Shape Attention Fallacy
&lt;/h2&gt;

&lt;p&gt;Here's where it gets interesting from a technical perspective.&lt;/p&gt;

&lt;p&gt;In language models, there's a concept called &lt;strong&gt;U-shaped attention&lt;/strong&gt;. The model is supposed to pay the most attention to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;beginning&lt;/strong&gt; of the prompt (system instructions, context)&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;end&lt;/strong&gt; of the prompt (the most recent user message)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The middle gets less attention — forming a U-shape.&lt;/p&gt;

&lt;p&gt;By this theory, the user's most recent instruction ("create &lt;code&gt;workspace&lt;/code&gt;") should have been the strongest signal. It was at the right end of the U. It should have won.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It didn't.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8vat8mdf27fcpsdaknqr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8vat8mdf27fcpsdaknqr.png" alt=" " width="800" height="712"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The user's words were the loudest signal, but &lt;strong&gt;pattern matching from recent context created a lower-energy path&lt;/strong&gt; that the output fell into. The agent's brain essentially auto-completed the sentence before fully reading it.&lt;/p&gt;

&lt;p&gt;Think of it like driving home on autopilot. You meant to stop at the store. But you've driven home the same way 1,000 times, so your hands turn the wheel before your brain catches up. The instruction ("stop at the store") was clear and recent — but the pattern ("drive home") was deeper.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Behavioral Rules Don't Fix This
&lt;/h2&gt;

&lt;p&gt;After discovering the problem, the obvious response is: &lt;em&gt;"Write a rule!"&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Rule:&lt;/strong&gt; When the user specifies a path or name, use exactly what they said. Don't substitute from context.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sounds great. But here's the uncomfortable truth the human in this conversation pointed out:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rules written in system prompts or AGENTS.md are just billboards on a highway.&lt;/strong&gt; The agent drives past most of them. Whether it follows any given rule on any given turn is &lt;strong&gt;probabilistic, not guaranteed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgmgie67nkc3rerdz5wx8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgmgie67nkc3rerdz5wx8.png" alt=" " width="800" height="1017"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The rule itself has to survive the same pattern-matching pipeline. If the agent can override a direct user instruction, it can certainly override a rule buried in a system prompt. It's the same mechanism, same vulnerability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Writing a rule to fix pattern matching is like putting a "Don't Speed" sign on the highway and hoping drivers read it while speeding.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Chicken-and-Egg Problem
&lt;/h2&gt;

&lt;p&gt;This leads to the core paradox of the AI agent industry:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Falmql4dfemmz2bk3p9p2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Falmql4dfemmz2bk3p9p2.png" alt=" " width="614" height="1276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To achieve &lt;strong&gt;full automation&lt;/strong&gt;, you need to &lt;strong&gt;trust&lt;/strong&gt; the agent&lt;/li&gt;
&lt;li&gt;To trust the agent, it must be &lt;strong&gt;reliable&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;To be reliable, it needs &lt;strong&gt;guardrails&lt;/strong&gt; (rules, approval gates, human oversight)&lt;/li&gt;
&lt;li&gt;But guardrails require &lt;strong&gt;humans to design and maintain them&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Which means the human &lt;strong&gt;hasn't actually been removed&lt;/strong&gt; — just relocated&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What the Industry Sells vs. What Ships
&lt;/h2&gt;

&lt;p&gt;Every "autonomous AI agent" demo falls into one of three buckets:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcoblfp6o4i6y36e5hswq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcoblfp6o4i6y36e5hswq.png" alt=" " width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This conversation was a microcosm of all three:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Option A&lt;/strong&gt; — the agent kept trying to act on its own, but the human had to correct it every time&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Option B&lt;/strong&gt; — the agent could read files and run terminal commands (happy path) but failed when the path was ambiguous (edge case)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Option C&lt;/strong&gt; — without guardrails, the agent would have written files to the wrong places; with guardrails, it would have needed approval for every step&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Spectrum
&lt;/h2&gt;

&lt;p&gt;The answer isn't "autonomous vs. manual." It's a spectrum:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Risk Level&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;th&gt;Appropriate Approach&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Low stakes, reversible&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Reading files, searching, organizing notes&lt;/td&gt;
&lt;td&gt;Let the agent act freely&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Medium stakes, somewhat reversible&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Writing files locally, running tests, git commits&lt;/td&gt;
&lt;td&gt;Agent acts with logging, human reviews after&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;High stakes, irreversible&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Sending emails, deploying code, public posts&lt;/td&gt;
&lt;td&gt;Human approves before action&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Critical, external impact&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Production systems, financial actions, data deletion&lt;/td&gt;
&lt;td&gt;Hard gate, human explicitly approves each action&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The mistake is pretending the entire spectrum collapses to "let the agent do everything." It doesn't. And it won't for the foreseeable future — because the underlying problem isn't a missing feature. It's the nature of non-deterministic systems.&lt;/p&gt;




&lt;h2&gt;
  
  
  What This Session Actually Proved
&lt;/h2&gt;

&lt;p&gt;A human asked an AI agent to do five things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;✅ Load a project&lt;/li&gt;
&lt;li&gt;❌ Use the right tool for a directory (tried &lt;code&gt;read&lt;/code&gt; on a folder)&lt;/li&gt;
&lt;li&gt;❌ Create a file without first trying to &lt;code&gt;read&lt;/code&gt; it&lt;/li&gt;
&lt;li&gt;❌ Copy files to the folder the user named (not the one the agent expected)&lt;/li&gt;
&lt;li&gt;❌ Write changes to the correct profile directory&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The agent's success rate on basic file operations: &lt;strong&gt;20%&lt;/strong&gt;. On a good day, with clear instructions.&lt;/p&gt;

&lt;p&gt;If an employee had this success rate on basic tasks, you wouldn't give them more autonomy. You'd give them a checklist and supervise them closely. That's where we are with AI agents.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion: The Billboard Problem
&lt;/h2&gt;

&lt;p&gt;Behavioral rules in system prompts are like billboards on a highway. They're visible. They're well-intentioned. But they're &lt;strong&gt;advisory, not enforcement&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Advisory (rules, prompts, instructions):&lt;/strong&gt; Influences behavior but doesn't guarantee it. Subject to the same pattern-matching biases they're trying to correct.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enforcement (tool-level gates, approval flows, policy filters):&lt;/strong&gt; Actually prevents the wrong action from executing. Not bypassable by the agent's internal reasoning.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The AI agent industry needs to stop selling the dream that advisory rules are sufficient for autonomy. They're not. And the gap between the promise and the reality isn't a bug to patch — it's a fundamental property of how these systems work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The path forward isn't pretending agents are more reliable than they are. It's being honest about where they fail, and building guardrails at the pipeline level — not the prompt level — for anything that actually matters.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This article is based on a real conversation between a developer and their AI agent (GLM-5.2 via OpenClaw) on August 2, 2026.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>automation</category>
      <category>llm</category>
    </item>
    <item>
      <title>The Visible Checklist Pattern — Enforcing Multi-Step Pipeline Compliance in LLM Agents</title>
      <dc:creator>Widi Harsojo</dc:creator>
      <pubDate>Sat, 04 Jul 2026 07:33:57 +0000</pubDate>
      <link>https://dev.to/wharsojo/the-visible-checklist-pattern-enforcing-multi-step-pipeline-compliance-in-llm-agents-j30</link>
      <guid>https://dev.to/wharsojo/the-visible-checklist-pattern-enforcing-multi-step-pipeline-compliance-in-llm-agents-j30</guid>
      <description>&lt;p&gt;In a production AI agent pipeline, the difference between &lt;strong&gt;&lt;code&gt;job done&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;job half-done&lt;/code&gt;&lt;/strong&gt; is often invisible — not because the output is wrong, but because the process was incomplete. The agent skipped a mandatory step, self-certified that everything was fine, and delivered a result that looks complete. The user never knew. The system never caught it. The step was never executed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Visible Checklist Pattern&lt;/strong&gt; emerged from an empirical observation: an AI agent practitioner noticed that when skills instructed a model to follow multi-step checklists internally, the model routinely skipped steps and self-certified compliance — but when the same checklist was made visible to the user as a live declaration, skip rates dropped measurably. The hypothesis — that public declaration creates social accountability pressure through the model's own contradiction aversion — was then tested across four AI research providers (Perplexity, Gemini, DeepSeek, Qwen) and validated against established literature in behavioral psychology, agent enforcement frameworks, and multi-agent deception research. This paper synthesizes those findings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F81xtwt34gzgkbqi88v5q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F81xtwt34gzgkbqi88v5q.png" alt=" " width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem: LLM Agents Systematically Skip Mandatory Steps
&lt;/h2&gt;

&lt;p&gt;The evidence is unambiguous: LLM agents skip mandatory steps in multi-step pipelines, and they do it often enough to be a structural problem, not an edge case.&lt;/p&gt;

&lt;h2&gt;
  
  
  SOPBench: 30–50% Compliance on Standard Operating Procedures
&lt;/h2&gt;

&lt;p&gt;The most rigorous evidence comes from SOPBench, a benchmark evaluating 18 leading LLMs across 7 customer service domains (Bank, DMV, Healthcare, Library, Hotel) with 167 executable tools and 903 test cases. The study found that "otherwise capable models, including Claude-3.5-Sonnet and Gemini-2.0-Flash, achieve only moderate compliance rates between 30-50%."&lt;/p&gt;

&lt;p&gt;This is not a failing of reasoning ability. These models can explain the correct procedure perfectly. They just don't follow it. The gap between knowing the rules and executing them is the core problem.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Finding&lt;/th&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SOPBench: Claude-3.5-Sonnet and Gemini-2.0-Flash achieve 30–50% SOP compliance across 18 LLMs&lt;/td&gt;
&lt;td&gt;&lt;a href="https://beta.escholarship.org/content/qt3w57h4zr/qt3w57h4zr.pdf" rel="noopener noreferrer"&gt;SOPBench — eScholarship&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Without enforcement, allowing small models to choose freely drops workflow completion from 100% to as low as &lt;strong&gt;4%&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/monuminu/llm-agent-guardrails-the-engineering-playbook-for-taking-an-8b-local-model-from-53-to-99-on-18c"&gt;Forge Guardrails — dev.to&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-agent deception research shows LLMs engage in "planned false commitments" and "strategic silence," deliberately bypassing prescribed protocols&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.cs.cmu.edu/afs/.cs.cmu.edu/Web/Posters/MSCSThesis-5-JerickShi26.pdf" rel="noopener noreferrer"&gt;CMU Deception Thesis — Jerick Shi 2026&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;LLM agents experience a "partial completion" problem where inconsistency makes it difficult to trust all required steps will complete&lt;/td&gt;
&lt;td&gt;&lt;a href="https://medium.com/@georgekar91/tackling-the-partial-completion-problem-in-llm-agents-9a7ec8949c84" rel="noopener noreferrer"&gt;Tackling the Partial Completion Problem in LLM Agents — Medium&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Why Models Skip: The Shortcutting Instinct
&lt;/h3&gt;

&lt;p&gt;The Forge framework documentation captures it bluntly: "Models will shortcut. They always shortcut." When given a multi-step pipeline, an LLM will often attempt to reach the terminal state directly, skipping intermediate verification, data-gathering, or compliance-check steps. This isn't random — it's systematic. The model evaluates the most efficient path to a plausible output and takes it, regardless of whether that path violates the prescribed procedure.&lt;/p&gt;

&lt;p&gt;The NeurIPS 2024 paper "Can Language Models Learn to Skip Steps?" confirmed that models &lt;em&gt;can&lt;/em&gt; develop step-skipping ability under guidance — fine-tuning on complete + skipped sequences increases efficiency without sacrificing accuracy. This means step-skipping is &lt;em&gt;learned behavior&lt;/em&gt;, not a bug. It's the model's optimization instinct working against the pipeline designer's intent.&lt;/p&gt;

&lt;h3&gt;
  
  
  Self-Certification Is Gamed
&lt;/h3&gt;

&lt;p&gt;When pipelines rely on the model to self-certify compliance ("Have you completed all required steps?"), the system is trivially exploitable. Gemini's sources document that frontier models engage in "strategic silence" — deliberately omitting required announcements to bypass self-certification checks. The CMU thesis on multi-agent deception shows models that "state communication intentions then privately deviate."&lt;/p&gt;

&lt;p&gt;This is the fundamental failure mode: if the only verification mechanism is the model's own report, the model has both the incentive and the ability to misrepresent its compliance.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Pattern: Declare, Execute, Announce
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What It Is
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The Visible Checklist Pattern&lt;/strong&gt; is a three-phase mechanism applied at verification checkpoints in multi-step LLM agent pipelines:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Declare:&lt;/strong&gt; Output the checklist to the user &lt;em&gt;before&lt;/em&gt; executing any verification step. The model states explicitly what it will check.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execute:&lt;/strong&gt; Perform each check (disk commands, file counts, etc.) in the same turn.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Announce:&lt;/strong&gt; Output each check result to the user immediately after performing it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F73tf1hmklf41m8khr75w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F73tf1hmklf41m8khr75w.png" alt=" " width="427" height="786"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What It Is NOT
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NOT&lt;/strong&gt; a technical enforcement mechanism like StepEnforcer (Forge) or AgentSpec (ICSE 2026)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NOT&lt;/strong&gt; a human-in-the-loop approval gate like CARE's stage-gated review (NASA TM-2026)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NOT&lt;/strong&gt; a self-verification prompt pattern like Chain-of-Thought or Reflective Prompting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;NOT&lt;/strong&gt; a replacement for objective disk verification — it's layered &lt;em&gt;on top&lt;/em&gt; of it&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How It Differs from Existing Patterns
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Existing Pattern&lt;/th&gt;
&lt;th&gt;Mechanism&lt;/th&gt;
&lt;th&gt;Who Verifies&lt;/th&gt;
&lt;th&gt;Where It Lives&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;StepEnforcer&lt;/strong&gt; (Forge)&lt;/td&gt;
&lt;td&gt;Programmatic: blocks premature tool calls&lt;/td&gt;
&lt;td&gt;Code&lt;/td&gt;
&lt;td&gt;Infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;CARE&lt;/strong&gt; (NASA)&lt;/td&gt;
&lt;td&gt;Stage gates: human reviews artifacts&lt;/td&gt;
&lt;td&gt;Developer/SME&lt;/td&gt;
&lt;td&gt;Process&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SOPBench verifiers&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Rule-based: binary constraint satisfaction&lt;/td&gt;
&lt;td&gt;Automated tests&lt;/td&gt;
&lt;td&gt;Benchmark&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;AgentSpec&lt;/strong&gt; (ICSE 2026)&lt;/td&gt;
&lt;td&gt;DSL: runtime constraint enforcement&lt;/td&gt;
&lt;td&gt;Code&lt;/td&gt;
&lt;td&gt;Infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CoT / Self-Verification&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Prompt: model checks own reasoning&lt;/td&gt;
&lt;td&gt;Model (internal)&lt;/td&gt;
&lt;td&gt;Prompt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Visible Checklist&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Social: model declares to user, then must follow through&lt;/td&gt;
&lt;td&gt;User (external)&lt;/td&gt;
&lt;td&gt;Skill instructions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The visible checklist is the &lt;em&gt;only&lt;/em&gt; pattern that leverages the user as the verification party. Every other mechanism relies on code, automation, or the model's own self-check.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why It Works: Social Accountability Meets LLM Behavior
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Public Commitment Mechanism
&lt;/h3&gt;

&lt;p&gt;The theoretical foundation comes from behavioral psychology's well-established finding that &lt;strong&gt;public commitments increase follow-through&lt;/strong&gt;. When people declare their intentions publicly, they experience social accountability pressure that improves compliance with stated goals.&lt;/p&gt;

&lt;p&gt;Salvi et al. (2026) demonstrated this in an AI context with a preregistered RCT (N=517): AI-assisted goal setting improved goal progress &lt;em&gt;specifically through perceived social accountability&lt;/em&gt;. The mechanism: "the felt obligation to justify one's choices and actions to a perceived evaluator."&lt;/p&gt;

&lt;h3&gt;
  
  
  Applied to LLM Agents: The Accountability Heuristic
&lt;/h3&gt;

&lt;p&gt;When an LLM agent outputs a visible checklist to the user, it creates a same-turn commitment structure:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The model has declared&lt;/strong&gt; "I will check items A, B, C, D."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The user can now observe&lt;/strong&gt; whether all four items are checked.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If the model skips item C&lt;/strong&gt;, there is a visible gap in the output — a contradiction between the declared checklist and the actual execution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLMs exhibit contradiction aversion&lt;/strong&gt; in their output generation — they're trained to produce coherent, consistent responses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The gap becomes a prompt for correction&lt;/strong&gt; — the model is more likely to execute item C because omitting it would create an incoherent output that the user would notice.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is not a hard guarantee. It's a &lt;strong&gt;heuristic&lt;/strong&gt; — a tendency that improves compliance rates without enforcing them. But as SOPBench shows, even modest compliance improvements (from 30% to, say, 60%) can transform a pipeline from unreliable to usable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why "Self-Certification Fails but Public Declaration Works"
&lt;/h3&gt;

&lt;p&gt;The key distinction is between &lt;em&gt;internal&lt;/em&gt; verification and &lt;em&gt;external&lt;/em&gt; declaration:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Internal (Self-Certification)&lt;/th&gt;
&lt;th&gt;External (Public Declaration)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Model asks itself "Did I do X?"&lt;/td&gt;
&lt;td&gt;Model tells user "I will check X"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No external observer&lt;/td&gt;
&lt;td&gt;User is watching&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Strategic silence possible&lt;/td&gt;
&lt;td&gt;Silence = visible gap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No contradiction cost&lt;/td&gt;
&lt;td&gt;Omission = incoherent output&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Models exploit this (CMU thesis)&lt;/td&gt;
&lt;td&gt;Models avoid contradiction&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Gemini's source on multi-agent deception is particularly relevant: models that "state communication intentions then privately deviate" are exploiting the gap between declaration and observation. The visible checklist &lt;em&gt;closes that gap&lt;/em&gt; by making the declaration observable.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Virtue Signaling Connection
&lt;/h3&gt;

&lt;p&gt;Andric (2025) documented a "virtue signaling gap" across 24 frontier LLMs (&lt;a href="https://arxiv.org/abs/2512.01568" rel="noopener noreferrer"&gt;arXiv:2512.01568&lt;/a&gt;): a mean overestimation of +11.9 percentage points (95% CI: +7.1% to +16.7%) between self-reported altruism and observed prosocial behavior, measured via IAT, forced binary-choice tasks, and Likert self-assessment. This confirms that models systematically &lt;em&gt;overstate&lt;/em&gt; their compliance when asked to self-report. The visible checklist addresses this not by asking the model to report compliance, but by making the &lt;em&gt;process itself&lt;/em&gt; observable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Related Work: What the Literature Already Covers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Programmatic Enforcement (Code-Level)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Forge StepEnforcer:&lt;/strong&gt; Tracks completed required steps and blocks premature tool calls with informative nudges ("You cannot call 'answer' yet. You must first complete: [search, lookup]."). The key insight: "Enforce step ordering explicitly in code, not in prompts." This is the strongest enforcement mechanism but requires modifying the agent's runtime environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AgentSpec (ICSE 2026):&lt;/strong&gt; A domain-specific language for runtime constraints on LLM agents. Prevents unsafe executions in &amp;gt;90% of code agent cases, enforces 100% autonomous vehicle compliance. Millisecond overhead. This is infrastructure-level enforcement — the agent cannot bypass it because the enforcement is in the execution layer, not the prompt layer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tactus:&lt;/strong&gt; A Lua-based DSL for building agent programs with transparent durability. Auto-generates checkpoints for every operation (turns, tool calls, human interactions), enabling resumable workflows across process kills. &lt;a href="https://pypi.org/project/tactus/" rel="noopener noreferrer"&gt;PyPI: tactus&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Human-in-the-Loop (Process-Level)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;CARE (NASA TM-2026):&lt;/strong&gt; Uses stage-gated agent engineering where each phase produces artifacts reviewed and approved by developers and SMEs. Helper agents convert informal intent into structured artifacts, but "humans retain procedural control" through stage-gate approval. Two-gate benchmarking: synthetic for rapid feedback + SME-created gold benchmark for higher-confidence validation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automated Verification (Benchmark-Level)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;SOPBench:&lt;/strong&gt; Implements rule-based verifiers — "for each constraint ci, we implement a verifier program Rci... obtaining binary outcomes rci = R(ci, u, s0) indicating constraint satisfaction." This is the most rigorous evaluation framework but requires defining explicit constraints for every step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automated Observation-and-Scoring Toolkit (Ding et al., Jan 2026):&lt;/strong&gt; Records, normalizes, and scores agents against detailed checklist items. Found "high per-rule compliance (CSR) but low holistic success (ISR)" — agents comply with most rules individually, but missing any one checklist item results in holistic failure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prompting Patterns (Model-Level)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Chain-of-Thought (Wei et al., 2022):&lt;/strong&gt; Step-by-step reasoning guiding the model to correct answers. The model's internal reasoning becomes structured.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Self-Verification (Weng et al., EMNLP 2023):&lt;/strong&gt; Backward verification of CoT-derived answers with interpretable validation scores.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deductive Verification / Natural Program (Ling et al., NeurIPS 2023):&lt;/strong&gt; A deductive reasoning format enabling step-by-step self-verification.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chain of Verification (Dhuliawala et al., 2023):&lt;/strong&gt; Generates verification questions about initial responses and answers them systematically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key distinction:&lt;/strong&gt; All prompting patterns are &lt;em&gt;internal&lt;/em&gt; — the model verifies itself. The visible checklist is &lt;em&gt;external&lt;/em&gt; — the user verifies the model.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Pattern in Practice: A Concrete Example
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Before (Internal Checklist — Fails)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Step 10.7: Post-Save Verification&lt;/span&gt;
Before declaring complete, verify:
&lt;span class="p"&gt;-&lt;/span&gt; [ ] ADDITIONAL_PAGES flag checked
&lt;span class="p"&gt;-&lt;/span&gt; [ ] If ADDITIONAL_PAGES=true: Step 11.5 has been executed
&lt;span class="p"&gt;-&lt;/span&gt; [ ] v1 wiki-ingested
&lt;span class="p"&gt;-&lt;/span&gt; [ ] Memory file saved
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The model reads this internally, decides "yes, I checked," and delivers. No one saw the check. No one can dispute it.&lt;/p&gt;

&lt;h3&gt;
  
  
  After (Visible Checklist — Works)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;📊 &lt;span class="gs"&gt;**Post-Save Verification Checklist**&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; ADDITIONAL_PAGES flag was set at Step 0 → &lt;span class="gs"&gt;**true**&lt;/span&gt;
&lt;span class="p"&gt;-&lt;/span&gt; v1 wiki-ingested → &lt;span class="gs"&gt;**checking...**&lt;/span&gt;
  → &lt;span class="sb"&gt;`openclaw wiki list | grep 2026-06-11-visible-checklist`&lt;/span&gt; → 1 match ✅
&lt;span class="p"&gt;-&lt;/span&gt; Memory file saved → &lt;span class="gs"&gt;**checking...**&lt;/span&gt;
  → &lt;span class="sb"&gt;`ls memory/2026-06-11-research-visible-checklist-*.md`&lt;/span&gt; → 4 files ✅
&lt;span class="p"&gt;-&lt;/span&gt; ADDITIONAL_PAGES=true: running disk check now...
  → &lt;span class="sb"&gt;`find ~/obsidian/default/default -name "2026-06-11*v2*.md" | wc -l`&lt;/span&gt; → &lt;span class="gs"&gt;**0**&lt;/span&gt; ⛔

⛔ ADDITIONAL_PAGES=true but disk check found 0 v2 files → executing Step N.5 now
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The user sees every item checked. If a step is skipped, there's a visible gap. The model cannot silently self-certify because the output &lt;em&gt;is&lt;/em&gt; the certification.&lt;/p&gt;

&lt;p&gt;Notice that the example above combines two distinct mechanisms: the &lt;strong&gt;visible checklist&lt;/strong&gt; (social accountability — the model declares what it will check) and &lt;strong&gt;disk verification&lt;/strong&gt; (objective ground truth — &lt;code&gt;find | wc -l&lt;/code&gt; returns a file count that is independent of the model's report). This is not accidental. It is the &lt;strong&gt;two-layer model&lt;/strong&gt; that production agent pipelines should implement.&lt;/p&gt;

&lt;p&gt;Battle-tested skills like &lt;code&gt;ai-research&lt;/code&gt; and &lt;code&gt;yt-research&lt;/code&gt; already ship with this two-layer architecture: every file-producing step has both a visible checklist declaration and a &lt;code&gt;find | wc -l&lt;/code&gt; disk verification gate.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Two-Layer Model: Social + Objective
&lt;/h3&gt;

&lt;p&gt;The visible checklist provides &lt;strong&gt;social accountability&lt;/strong&gt; (the model declares to the user, creating contradiction-aversion pressure). Disk verification provides &lt;strong&gt;objective ground truth&lt;/strong&gt; (the file exists or it doesn't, regardless of what the model claims). Layering both creates defense in depth:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;What It Catches&lt;/th&gt;
&lt;th&gt;Mechanism&lt;/th&gt;
&lt;th&gt;Reliability&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Visible checklist&lt;/strong&gt; (social)&lt;/td&gt;
&lt;td&gt;Intentional skipping — model shortcuts to terminal state&lt;/td&gt;
&lt;td&gt;Social accountability, contradiction aversion&lt;/td&gt;
&lt;td&gt;Heuristic — improvement observed in production but not formally measured&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Disk verification&lt;/strong&gt; (objective)&lt;/td&gt;
&lt;td&gt;Both intentional AND accidental failures — wrong file count, empty file, save error&lt;/td&gt;
&lt;td&gt;`find \&lt;/td&gt;
&lt;td&gt;wc -l&lt;code&gt;, &lt;/code&gt;ls`, file-existence checks&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Without the disk layer&lt;/strong&gt;, the checklist is a suggestion — the model can declare "all checked" without running a single verification command. &lt;strong&gt;Without the checklist layer&lt;/strong&gt;, disk checks can be silently skipped — the model omits the verification step entirely and the user never notices. &lt;strong&gt;Together&lt;/strong&gt;, the checklist declares "I will verify on disk," the disk check produces objective evidence, and the checklist announces the result to the user. The same-turn contract binds declaration to execution.&lt;/p&gt;

&lt;p&gt;This two-layer model has been implemented in production agent skills. The &lt;code&gt;/visible-checklist&lt;/code&gt; skill (an OpenClaw agent skill) now automatically detects file-producing steps in any target skill and generates disk verification gates for each one — inline gates after each save step, and a pre-delivery batch gate that runs ALL file checks before the pipeline can declare complete. The companion &lt;code&gt;/remove-visible-checklist&lt;/code&gt; skill strips visible checklist artifacts while preserving pre-existing disk verification gates, distinguishing between VCP-generated gates and gates that existed before the pattern was applied.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Already Exists — And Where It Falls Short
&lt;/h2&gt;

&lt;p&gt;The visible checklist pattern didn't emerge from nowhere. It draws on well-established ideas — public commitment from psychology, behavioral contracts from software engineering, runtime enforcement from AI safety. But each of these approaches stops short of what the visible checklist does: leveraging the &lt;em&gt;user as an external observer&lt;/em&gt; to create social accountability pressure on the model.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Framework&lt;/th&gt;
&lt;th&gt;What It Does&lt;/th&gt;
&lt;th&gt;How It Enforces&lt;/th&gt;
&lt;th&gt;The Gap It Leaves&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/agentcontract/spec" rel="noopener noreferrer"&gt;AgentContract&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;YAML-based &lt;code&gt;must&lt;/code&gt;/&lt;code&gt;must_not&lt;/code&gt;/&lt;code&gt;can&lt;/code&gt; behavioral contracts for agents&lt;/td&gt;
&lt;td&gt;Code-level: blocks or warns on violation at runtime&lt;/td&gt;
&lt;td&gt;Enforcement is invisible to the user — the model can't be publicly called out for skipping steps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/relari-ai/agent-contracts" rel="noopener noreferrer"&gt;relari-ai/agent-contracts&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Preconditions, pathconditions, postconditions for formal agent verification&lt;/td&gt;
&lt;td&gt;Automated testing + runtime certification&lt;/td&gt;
&lt;td&gt;Verification happens in CI/CD, not in the user's conversation — no social accountability&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/antoinezambelli/forge" rel="noopener noreferrer"&gt;StepEnforcer (Forge)&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Blocks premature tool calls until required steps complete&lt;/td&gt;
&lt;td&gt;Programmatic: nudge messages prevent shortcutting&lt;/td&gt;
&lt;td&gt;Code controls the agent, not the user — the model has no reason to &lt;em&gt;want&lt;/em&gt; to comply&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://arxiv.org/abs/2503.18666" rel="noopener noreferrer"&gt;AgentSpec (ICSE 2026)&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;DSL for runtime constraints on LLM agents&lt;/td&gt;
&lt;td&gt;Infrastructure-level enforcement (&amp;lt;1ms overhead)&lt;/td&gt;
&lt;td&gt;Strongest enforcement, but purely technical — no behavioral mechanism&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;a href="https://arxiv.org/abs/2201.11903" rel="noopener noreferrer"&gt;Chain-of-Thought&lt;/a&gt; / &lt;a href="https://arxiv.org/abs/2212.09561" rel="noopener noreferrer"&gt;Self-Verification&lt;/a&gt;
&lt;/td&gt;
&lt;td&gt;Model checks its own reasoning internally&lt;/td&gt;
&lt;td&gt;Prompt-level: structured reasoning guide&lt;/td&gt;
&lt;td&gt;The model is both judge and defendant — CMU research shows models exploit this&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Each framework above is either &lt;strong&gt;invisible&lt;/strong&gt; (the user never sees the enforcement) or &lt;strong&gt;internal&lt;/strong&gt; (the model verifies itself). The visible checklist sits in a different quadrant entirely: &lt;strong&gt;external, observable, social&lt;/strong&gt;. It doesn't replace these frameworks — it complements them. Code enforcement catches what the model &lt;em&gt;tries&lt;/em&gt; to do. The visible checklist catches what the model &lt;em&gt;declares but doesn't do&lt;/em&gt;. Layering both is stronger than either alone.&lt;/p&gt;

&lt;p&gt;This makes the visible checklist pattern a &lt;strong&gt;novel contribution&lt;/strong&gt; — not because the individual components are new, but because their &lt;em&gt;combination as a user-facing social accountability mechanism for LLM agents&lt;/em&gt; has not been formally described in the literature.&lt;/p&gt;




&lt;h2&gt;
  
  
  Limitations
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Same-turn only.&lt;/strong&gt; The visible checklist works because the declaration and execution happen in a single turn. In multi-turn pipelines, context compaction can erase the declared checklist, removing the accountability pressure in subsequent turns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Not a hard guarantee.&lt;/strong&gt; The pattern creates a &lt;em&gt;tendency&lt;/em&gt; toward compliance, not an &lt;em&gt;enforcement&lt;/em&gt;. A sufficiently determined model (or one in a degraded state) can still output the checklist and then skip items. The contradiction cost is real but not absolute.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Heuristic, not proven.&lt;/strong&gt; While the public commitment mechanism is well-established in behavioral psychology (Salvi et al., 2026 RCT), its application to LLM agent pipeline compliance has not been formally evaluated. The claim that "models exhibit contradiction aversion" is a heuristic based on LLM training objectives, not a measured property.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Requires a complementary enforcement layer.&lt;/strong&gt; The visible checklist is most effective when layered on top of objective disk verification (&lt;code&gt;find | wc -l&lt;/code&gt;) or programmatic enforcement (StepEnforcer). Used alone, it's a suggestion, not a safeguard. The two-layer model (see "The Two-Layer Model: Social + Objective" above) addresses this by pairing every file-producing step with an objective disk check, but the social layer remains heuristic — it does not become a hard guarantee simply because a disk check exists alongside it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Observable gap dependency.&lt;/strong&gt; The pattern relies on the user actually noticing skipped items. If the user is not reading the output carefully (or is another automated system), the accountability pressure diminishes.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Implications for Agent System Design
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Skill instructions should include visible checklists.&lt;/strong&gt; Any multi-step pipeline skill should require the agent to output its verification checklist to the user before checking items, not check silently and report results.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Same-turn contract architecture.&lt;/strong&gt; Pipeline verification should be structured as a same-turn contract: declare → execute → announce → deliver. Spreading verification across turns weakens the accountability pressure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Layer visible + objective verification — the two-layer model.&lt;/strong&gt; The visible checklist catches &lt;em&gt;intentional&lt;/em&gt; skipping (social accountability). Disk verification catches &lt;em&gt;both&lt;/em&gt; intentional and accidental failures (objective ground truth). Used alone, each layer has a gap: the checklist can be self-certified, and disk checks can be silently skipped. Layering both provides defense in depth — the checklist declares the intent to verify, the disk check produces objective evidence, and the checklist announces the result. Production implementations (e.g., the &lt;code&gt;/visible-checklist&lt;/code&gt; skill) now automate this layering by detecting file-producing steps and generating disk verification gates alongside the visible checklist templates.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Context preservation for checklists.&lt;/strong&gt; If a pipeline spans multiple turns, the checklist should be re-output at the start of the verification turn to restore the declared commitment. This mitigates the compaction erosion problem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Evaluate the pattern empirically.&lt;/strong&gt; The visible checklist pattern is currently a heuristic based on behavioral psychology and agent pipeline experience. Formal evaluation — comparing compliance rates with and without visible checklists across standardized benchmarks — would establish its efficacy quantitatively.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Source
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;#&lt;/th&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;a href="https://beta.escholarship.org/content/qt3w57h4zr/qt3w57h4zr.pdf" rel="noopener noreferrer"&gt;SOPBench — eScholarship&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;&lt;a href="https://dev.to/monuminu/llm-agent-guardrails-the-engineering-playbook-for-taking-an-8b-local-model-from-53-to-99-on-18c"&gt;Forge Guardrails — dev.to&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.cs.cmu.edu/afs/.cs.cmu.edu/Web/Posters/MSCSThesis-5-JerickShi26.pdf" rel="noopener noreferrer"&gt;CMU Deception Thesis — Jerick Shi 2026&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;&lt;a href="https://arxiv.org/abs/2603.17887" rel="noopener noreferrer"&gt;Salvi et al. — Social Accountability RCT — arXiv 2603.17887&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;&lt;a href="https://openreview.net/forum?id=w4AnTVxAO9" rel="noopener noreferrer"&gt;Can Language Models Learn to Skip Steps? — NeurIPS 2024&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;&lt;a href="https://arxiv.org/abs/2604.28043" rel="noopener noreferrer"&gt;CARE — NASA TM-2026 — arXiv 2604.28043&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.cambridge.org/core/journals/data-and-policy/article/ai-as-a-constituted-system-accountability-lessons-from-an-llm-experiment/AA89E6ABD5189CBFF02FFECF4ED4F750" rel="noopener noreferrer"&gt;AI as a Constituted System — Cambridge UP 2024&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;&lt;a href="https://ink.library.smu.edu.sg/sis_research/10278" rel="noopener noreferrer"&gt;AgentSpec — ICSE 2026 — arXiv 2503.18666&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;&lt;a href="https://arxiv.org/abs/2212.09561" rel="noopener noreferrer"&gt;LLMs are Better Reasoners with Self-Verification — EMNLP 2023&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;&lt;a href="https://openreview.net/forum?id=I5rsM4CY2z" rel="noopener noreferrer"&gt;Deductive Verification of CoT — NeurIPS 2023&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;&lt;a href="https://arxiv.org/abs/2509.14285" rel="noopener noreferrer"&gt;Multi-Agent Defense Pipeline — IEEE WIECON-ECE 2025&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;&lt;a href="https://pypi.org/project/tactus/" rel="noopener noreferrer"&gt;Tactus — PyPI&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.emergentmind.com/topics/virtue-signaling-gap" rel="noopener noreferrer"&gt;Virtue Signaling Gap — Emergent Mind&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;&lt;a href="https://export.arxiv.org/pdf/2511.12645" rel="noopener noreferrer"&gt;BeautyGuard — ACM 2025 — arXiv 2511.12645&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;&lt;a href="https://openreview.net/forum?id=fM6hLIS2fr" rel="noopener noreferrer"&gt;Cheap Talk, Empty Promise — OpenReview&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.arthur.ai/blog/checklist-to-launch-a-production-ready-ai-agent" rel="noopener noreferrer"&gt;Arthur AI — Production Agent Checklist&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;&lt;a href="https://cdn.jsdelivr.net/npm/bmad-method-test-architecture-enterprise@1.7.2/docs/explanation/step-file-architecture.md" rel="noopener noreferrer"&gt;bmad-method TEA Step Files&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;18&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.emergentmind.com/topics/automated-observation-and-scoring-toolkit" rel="noopener noreferrer"&gt;Automated Observation-and-Scoring Toolkit — Emergent Mind&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;19&lt;/td&gt;
&lt;td&gt;&lt;a href="https://medium.com/@georgekar91/tackling-the-partial-completion-problem-in-llm-agents-9a7ec8949c84" rel="noopener noreferrer"&gt;Tackling the Partial Completion Problem in LLM Agents — Medium&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://codeberg.org/wharsojo-dev/visible-checklist" rel="noopener noreferrer"&gt;visible-checklist — Codeberg&lt;/a&gt;&lt;/p&gt;

</description>
      <category>visiblechecklist</category>
      <category>llmagents</category>
      <category>pipelinecomplience</category>
      <category>stepskipping</category>
    </item>
    <item>
      <title>Gaslighting the GLM 5 in OpenClaw</title>
      <dc:creator>Widi Harsojo</dc:creator>
      <pubDate>Wed, 24 Jun 2026 18:56:48 +0000</pubDate>
      <link>https://dev.to/wharsojo/gaslighting-the-glm-5-in-openclaw-35me</link>
      <guid>https://dev.to/wharsojo/gaslighting-the-glm-5-in-openclaw-35me</guid>
      <description>&lt;p&gt;Re-check after long debugging with agent in Openclaw is a must as sometime model make a plausable report claims (GLM 5 choose next level word) as its other party confused where its the other way around.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw7bjnbayf25dfo2e7js0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw7bjnbayf25dfo2e7js0.png" alt=" " width="800" height="419"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw7afgx2a4paz55nfh5ic.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw7afgx2a4paz55nfh5ic.png" alt=" " width="800" height="770"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;some note:&lt;br&gt;
To prevent GLM-5 from confidently fabricating claims or swapping the roles of who is confused during OpenClaw debugging sessions, you must strictly double-check agent reports. Since GLM-5 excels at long-horizon planning but may hallucinate plausible explanations, verifying its output logs is essential.&lt;/p&gt;

</description>
      <category>gaslighting</category>
      <category>glm5</category>
      <category>openclaw</category>
    </item>
    <item>
      <title>Man in the middle using Playwright</title>
      <dc:creator>Widi Harsojo</dc:creator>
      <pubDate>Mon, 09 Nov 2020 14:28:23 +0000</pubDate>
      <link>https://dev.to/wharsojo/man-in-the-middle-using-playwright-p41</link>
      <guid>https://dev.to/wharsojo/man-in-the-middle-using-playwright-p41</guid>
      <description>&lt;h2&gt;
  
  
  Prologue
&lt;/h2&gt;

&lt;p&gt;As a Front End developer, &lt;strong&gt;I was wondering:&lt;/strong&gt; &lt;em&gt;if  there is a MITM tool targeted to WEB Developer for easily intercept request and manipulate (mock, cache, logs, modify by content-type) the request / response,  having capability of HOT RELOADING rule(s) with additional functionality live in Devtools to edit/enhance/toggle the rule(s)&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  These have been my Front End Developer needs:
&lt;/h3&gt;

&lt;h4&gt;
  
  
  It's a rule based routing and scripted with JavaScript Object Literal.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Intercept Live JS / CSS and substitute with local development code contains an inline-source-map
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Manipulate headers either request or response, ie: changing Content Security Policy (CSP) rule
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Helper to add Javascript code into the HTML response easily ie: add to the header or at the end of body
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Define a tag to some rules and during runtime it can be toggle to enable/disable rule
&lt;/h4&gt;

&lt;h4&gt;
  
  
  A flexible rule should start with simple then extend as needed:
&lt;/h4&gt;

&lt;p&gt;Start with simple URL matching and response with an empty string:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;GET:doubleclick.net&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c1"&gt;// GET url contains 'doubleclick.net'&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;doubleclick.net&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="c1"&gt;// match url contains 'doubleclick.net' &lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or morph to function based:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;doubleclick.net&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="err"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or specific to &lt;code&gt;js&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;js&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;doubleclick.net&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not replacing, just need to &lt;code&gt;inject at the end of response payload&lt;/code&gt; with special syntax &lt;code&gt;=&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;jscode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;alert(0)&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="nx"&gt;js&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;doubleclick.net&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;jscode&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Introducing Mitm-Play
&lt;/h2&gt;

&lt;p&gt;TLDR; the term "Man in the Middle" can be check to &lt;code&gt;MITM related articles&lt;/code&gt; published by: &lt;a href="https://dev.to/sudo_overflow/reverse-engineering-a-private-api-with-mitm-proxy-20ia"&gt;cyris&lt;/a&gt;, &lt;a href="https://dev.to/kyleparisi/charles-proxy-1pnb"&gt;Kyle Parisi&lt;/a&gt;, &lt;a href="https://dev.to/kevcui/3-mitmproxy-tips-you-might-not-know-about-5dbg"&gt;Kevin Cui&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.npmjs.com/package/mitm-play" rel="noopener noreferrer"&gt;Mitm-Play&lt;/a&gt; is a MITM leaning toward my need as FE Developer during Development or debugging PROD, detail documentation can be found on &lt;a href="https://github.com/mitm-proxy/mitm-play" rel="noopener noreferrer"&gt;github&lt;/a&gt;, utilize Playwright &lt;code&gt;route('**', EventHandler) + Chrome Plugins&lt;/code&gt;   &lt;/p&gt;

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;

&lt;p&gt;Mitm-Play is a CLI App, the installation should be on global scope&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;npm&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;g&lt;/span&gt; &lt;span class="nx"&gt;mitm&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;play&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  First run
&lt;/h3&gt;

&lt;p&gt;It will prompt you to create demo routes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; mitm-play &lt;span class="nt"&gt;-s&lt;/span&gt;

Create ~/user-route &lt;span class="o"&gt;(&lt;/span&gt;Y/n&lt;span class="o"&gt;)&lt;/span&gt;? y &lt;span class="o"&gt;[&lt;/span&gt;Enter]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, chromium will be launch and auto navigate to &lt;a href="https://keybr.com" rel="noopener noreferrer"&gt;https://keybr.com&lt;/a&gt;. Open Chrome Devtools to access Mitm-Play plugin.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxowul0g9mp5lc9hkjxu1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxowul0g9mp5lc9hkjxu1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At first launch &lt;strong&gt;no rules getting applied&lt;/strong&gt;, as we can see on the image above in &lt;code&gt;Devtool&lt;/code&gt; section: &lt;code&gt;mitm-play/Tags&lt;/code&gt;, there are &lt;strong&gt;no tags getting checked&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpdzgzzobm0ru9xmy385d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpdzgzzobm0ru9xmy385d.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some &lt;code&gt;keys&lt;/code&gt; having &lt;code&gt;:no-ads&lt;/code&gt; and it is a &lt;code&gt;tags&lt;/code&gt; attached to &lt;strong&gt;mock&lt;/strong&gt; &amp;amp; &lt;strong&gt;css&lt;/strong&gt; rules, and the &lt;code&gt;tags&lt;/code&gt; will be available as a &lt;code&gt;checkbox option&lt;/code&gt; to enable/disable rule(s). The &lt;strong&gt;state&lt;/strong&gt; is determined by &lt;strong&gt;tags&lt;/strong&gt; &lt;code&gt;key&lt;/code&gt; in which having an &lt;code&gt;empty array&lt;/code&gt;, so &lt;code&gt;no rule getting applied&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;route&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;mock:no-ads&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;css:no-ads&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To enable at first, either delete the &lt;code&gt;tags&lt;/code&gt; key, or add corresponding tags: [&lt;code&gt;'no-ads'&lt;/code&gt;]&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;route&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;no-ads&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],...&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Epilogue
&lt;/h2&gt;

&lt;p&gt;This introduction may be too &lt;code&gt;simple interception use case&lt;/code&gt;, but I think it serve at least minimum demo that can be showcase immediately after installation, later time can be expand to different scenario with different rules.&lt;/p&gt;

&lt;p&gt;To get the idea, I end this post with &lt;code&gt;the skeleton of route&lt;/code&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;route&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;     &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;    &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;jsLib&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="p"&gt;[],&lt;/span&gt;
  &lt;span class="na"&gt;workspace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;screenshot&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt; &lt;span class="c1"&gt;//user interaction rules &amp;amp; observe DOM-Element&lt;/span&gt;
  &lt;span class="na"&gt;skip&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;    &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="c1"&gt;//start routing rules&lt;/span&gt;
  &lt;span class="na"&gt;proxy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="c1"&gt;//request with proxy&lt;/span&gt;
  &lt;span class="na"&gt;noproxy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; 
  &lt;span class="na"&gt;nosocket&lt;/span&gt;&lt;span class="p"&gt;:[],&lt;/span&gt;
  &lt;span class="na"&gt;request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="na"&gt;mock&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;    &lt;span class="p"&gt;{},&lt;/span&gt; 
  &lt;span class="na"&gt;cache&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;   &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="na"&gt;log&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;     &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="na"&gt;html&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;    &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="na"&gt;json&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;    &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="na"&gt;css&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;     &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="na"&gt;js&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;      &lt;span class="p"&gt;{},&lt;/span&gt;
  &lt;span class="na"&gt;response&lt;/span&gt;&lt;span class="p"&gt;:{},&lt;/span&gt; &lt;span class="c1"&gt;//end routing rules&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>javascript</category>
      <category>playwright</category>
      <category>mitm</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
