<?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: mufeng</title>
    <description>The latest articles on DEV Community by mufeng (@changyou).</description>
    <link>https://dev.to/changyou</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%2F3969584%2Fc906e166-2d8c-4b15-8630-8abd8638cad2.png</url>
      <title>DEV Community: mufeng</title>
      <link>https://dev.to/changyou</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/changyou"/>
    <language>en</language>
    <item>
      <title>I Built a Durable AI Knowledge Base with Markdown and Git</title>
      <dc:creator>mufeng</dc:creator>
      <pubDate>Sat, 25 Jul 2026 03:32:01 +0000</pubDate>
      <link>https://dev.to/changyou/i-built-a-durable-ai-knowledge-base-with-markdown-and-git-4fhb</link>
      <guid>https://dev.to/changyou/i-built-a-durable-ai-knowledge-base-with-markdown-and-git-4fhb</guid>
      <description>&lt;p&gt;&lt;em&gt;Why search alone does not create memory—and how source layers, agent rules, and deterministic checks keep a knowledge base useful over time&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;My AI knowledge base starts with a directory tree, not a search box:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10-inbox      rough, unverified capture
20-sources    evidence that cannot be silently rewritten
30-knowledge  synthesis that can change with new evidence
40-projects   goals, constraints, and current execution state
50-research   questions, competing explanations, and evidence gaps
60-writing    drafts and publication records
70-investing  observations, theses, and capital decisions
80-logs       append-only changes, decisions, and handoffs
90-archive    inactive material retained for history
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The point of these folders is not tidiness. Each one defines a different change contract.&lt;/p&gt;

&lt;p&gt;A captured conversation may be incomplete. A source record should preserve what was actually found. A synthesis page must remain editable because better evidence may overturn it. A project decision needs a date and an owner. A log should not be rewritten simply because the outcome later became inconvenient.&lt;/p&gt;

&lt;p&gt;That distinction turned out to matter more than the choice of model, embedding database, or note-taking app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Search can retrieve knowledge. It does not maintain it.
&lt;/h2&gt;

&lt;p&gt;Most AI document tools follow a retrieval-augmented generation pattern: upload files, retrieve relevant chunks at query time, and ask a model to assemble an answer.&lt;/p&gt;

&lt;p&gt;This is useful. It is also easy to mistake for long-term memory.&lt;/p&gt;

&lt;p&gt;If a question requires five documents, a retrieval system may locate and combine five fragments each time the question is asked. The answer can be excellent, yet the synthesis usually disappears into chat history. A contradiction discovered today may have to be rediscovered next month. A corrected interpretation may never update the next answer.&lt;/p&gt;

&lt;p&gt;In April 2026, Andrej Karpathy described a different pattern in his &lt;a href="https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f" rel="noopener noreferrer"&gt;LLM Wiki proposal&lt;/a&gt;: put a persistent, interlinked Markdown wiki between raw sources and the user. When a new source arrives, an agent does more than index it. The agent updates topic pages, adds cross-references, records contradictions, and revises the existing synthesis.&lt;/p&gt;

&lt;p&gt;Karpathy's document is a design proposal, not a benchmark proving that a wiki beats RAG at every scale. I treat the two as complementary:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The maintained wiki stores conclusions, relationships, and unresolved disagreements that have already been developed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Retrieval helps an agent find the right sources and pages as the collection grows.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Raw evidence remains available when a conclusion needs to be audited or rebuilt.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Search is the navigation layer. It should not quietly become the truth layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  A durable AI knowledge base needs three jobs
&lt;/h2&gt;

&lt;p&gt;The simplest useful architecture has three layers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw sources -&amp;gt; maintained knowledge -&amp;gt; agent schema
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each layer answers a different question.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. What did the source actually say?
&lt;/h3&gt;

&lt;p&gt;The source layer stores provenance: the exact URL or file, author, publication date when available, access date, and any capture limitations. It may also include a faithful excerpt or source note.&lt;/p&gt;

&lt;p&gt;Its job is not to be elegant. Its job is to make later verification possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. What do I currently think the evidence supports?
&lt;/h3&gt;

&lt;p&gt;The knowledge layer contains concept pages, comparisons, summaries, and evolving conclusions. These pages are expected to change. If new evidence weakens an old claim, the synthesis should say so.&lt;/p&gt;

&lt;p&gt;This is where accumulated knowledge lives. It is not raw evidence, and it should never pretend to be.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. How may an agent change the system?
&lt;/h3&gt;

&lt;p&gt;The schema or repository protocol tells an agent how to name files, check for duplicates, cite claims, update indexes, and validate its work. In my setup, these rules live in &lt;code&gt;AGENTS.md&lt;/code&gt; and in the frontmatter schema used by each page.&lt;/p&gt;

&lt;p&gt;Without this layer, every new agent session has to guess the rules again. The result is predictable: duplicate pages, drifting names, missing links, and confident summaries with weak provenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I extended the three-layer model
&lt;/h2&gt;

&lt;p&gt;The three-layer model explains how documents become maintained knowledge. My repository also has to support execution: projects, research questions, writing, and investment decisions.&lt;/p&gt;

&lt;p&gt;Those objects do not age in the same way.&lt;/p&gt;

&lt;p&gt;An early draft used a generic structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;raw/
wiki/
daily/
memory/
projects/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It looked simple until real material arrived.&lt;/p&gt;

&lt;p&gt;Should an unverified chat transcript go into &lt;code&gt;wiki&lt;/code&gt; or &lt;code&gt;memory&lt;/code&gt;? Should a research conclusion and a project decision use the same status fields? If a source later proves inaccurate, may the original record be edited?&lt;/p&gt;

&lt;p&gt;Adding more vaguely named folders would not solve those questions. Defining mutation rules did.&lt;/p&gt;

&lt;p&gt;That led to the numbered directory structure at the beginning of this article. The important move was separating &lt;em&gt;evidence that should not be silently changed&lt;/em&gt; from &lt;em&gt;conclusions that must remain revisable&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Both rules are necessary. Immutable conclusions become dogma. Mutable evidence destroys the audit trail.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Markdown and Git are a practical foundation
&lt;/h2&gt;

&lt;p&gt;I am not claiming that Markdown files automatically survive for decades, or that Git makes a repository truthful.&lt;/p&gt;

&lt;p&gt;I chose them for narrower reasons.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://spec.commonmark.org/0.31.2/" rel="noopener noreferrer"&gt;CommonMark specification&lt;/a&gt; defines Markdown as a plain-text format for structured documents and emphasizes that the source remains readable. A person can inspect it without a proprietary application. So can Codex, Claude Code, Cursor, Gemini CLI, OpenCode, or a future tool that does not exist yet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control" rel="noopener noreferrer"&gt;Pro Git&lt;/a&gt; describes version control as recording changes to files over time so that earlier versions can be recovered. In practice, Git gives this knowledge base reviewable diffs, history, branches, and portable clones.&lt;/p&gt;

&lt;p&gt;Together, Markdown and Git provide four properties I care about:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inspectability.&lt;/strong&gt; The content, sources, and operating rules are readable without a dedicated product.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Comparability.&lt;/strong&gt; When an agent changes a conclusion, a diff shows what changed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Portability.&lt;/strong&gt; Changing editors, models, or retrieval systems does not require exporting the core knowledge first.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Rebuildability.&lt;/strong&gt; Search indexes, graph caches, and visual interfaces can be regenerated from the files.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There are limits. Git is not a backup policy. Markdown does not verify claims. Private repositories still need access control and remote copies. Sensitive material still needs an explicit visibility model. The tools make governance possible; they do not perform it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give the agent a repository protocol, not a vague prompt
&lt;/h2&gt;

&lt;p&gt;“Organize my notes” is not an operating model.&lt;/p&gt;

&lt;p&gt;Before making a substantive change, an agent in my setup is expected to read the current priorities, the relevant indexes, the directory rules, and the schema. It must search for an existing page on the same subject before creating another one.&lt;/p&gt;

&lt;p&gt;A minimal page uses frontmatter like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;schema&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1&lt;/span&gt;
&lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;note-llm-compiled-knowledge&lt;/span&gt;
&lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;note&lt;/span&gt;
&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;LLM-compiled&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;knowledge"&lt;/span&gt;
&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;stable&lt;/span&gt;
&lt;span class="na"&gt;visibility&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;shareable&lt;/span&gt;
&lt;span class="na"&gt;created&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;2026-07-24&lt;/span&gt;
&lt;span class="na"&gt;updated&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;2026-07-24&lt;/span&gt;
&lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;ai-agents&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;knowledge-management&lt;/span&gt;
&lt;span class="na"&gt;confidence&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;high&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The schema is not an attempt to turn Markdown into a database. It establishes the minimum shared vocabulary required for several agents to work on the same repository without constantly renegotiating identity and lifecycle.&lt;/p&gt;

&lt;p&gt;The protocol also distinguishes different kinds of statements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fact:&lt;/strong&gt; directly supported by a source.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inference:&lt;/strong&gt; a conclusion drawn from one or more facts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Hypothesis:&lt;/strong&gt; a claim that still needs evidence.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Opinion:&lt;/strong&gt; an explicit judgment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Decision:&lt;/strong&gt; a chosen action, including its context and date.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the more dangerous model errors is not an obvious fabrication. It is a compression error: an author's opinion is summarized as a verified fact, or a tentative hypothesis loses its uncertainty label after three rewrites.&lt;/p&gt;

&lt;p&gt;Statement types make that drift easier to notice.&lt;/p&gt;

&lt;h2&gt;
  
  
  The citation failure that changed the design
&lt;/h2&gt;

&lt;p&gt;An early draft of my source material cited Karpathy's work with a link to his general Gist page.&lt;/p&gt;

&lt;p&gt;Technically, there was a reference. Practically, it was not auditable. A reader could not tell which Gist supported the claim, when it was created, or whether I had accurately represented it.&lt;/p&gt;

&lt;p&gt;I replaced the profile-level link with the exact &lt;a href="https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f" rel="noopener noreferrer"&gt;LLM Wiki Gist&lt;/a&gt; and created a separate source record containing its author, creation date, access date, capture method, and limitations.&lt;/p&gt;

&lt;p&gt;The mistake was small, but the lesson was not: a references section is not the same thing as evidence provenance. Search-result snippets, homepages, and model paraphrases are leads. They are not substitutes for the source itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Semantic review and deterministic checks solve different problems
&lt;/h2&gt;

&lt;p&gt;Natural-language instructions are good at expressing editorial judgment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Is this source credible enough for the claim?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Did a summary erase a disagreement?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Is a conclusion now stale?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Has an inference been presented as a fact?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They are an inefficient way to catch mechanical errors that ordinary code can find reliably:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;missing required fields&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;duplicate IDs&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;broken relative links&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;files stored under the wrong content type&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;pages omitted from an index&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My implementation uses a small Python tool, built only with the standard library, to perform those structural checks. The repository's verification command runs both unit tests and a health check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make verify
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This does not prove the knowledge is correct. It proves that a defined set of structural invariants holds. Semantic review and deterministic validation are complementary, not interchangeable.&lt;/p&gt;

&lt;h2&gt;
  
  
  A minimal implementation you can build this weekend
&lt;/h2&gt;

&lt;p&gt;You do not need my full directory structure. Start with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sources/
knowledge/
projects/
logs/
AGENTS.md
INDEX.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then add five constraints.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Choose the authoritative store
&lt;/h3&gt;

&lt;p&gt;Treat Markdown files and local assets as the source of record. Note apps, vector databases, and graph views can be useful interfaces, but they should not be the only copy of the knowledge.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Separate sources from synthesis
&lt;/h3&gt;

&lt;p&gt;Preserve the origin of a claim in &lt;code&gt;sources/&lt;/code&gt;. Put revisable summaries and concept pages in &lt;code&gt;knowledge/&lt;/code&gt;. Never promote an AI-generated summary into the source layer.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Write the agent's modification rules
&lt;/h3&gt;

&lt;p&gt;Your &lt;code&gt;AGENTS.md&lt;/code&gt; should answer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What must an agent read before editing?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How are files named and deduplicated?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Which records may be edited, and which are append-only?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How are facts cited and inferences labeled?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Which checks must pass before the task is complete?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Use a minimal schema
&lt;/h3&gt;

&lt;p&gt;Start with &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;type&lt;/code&gt;, &lt;code&gt;status&lt;/code&gt;, &lt;code&gt;created&lt;/code&gt;, &lt;code&gt;updated&lt;/code&gt;, and &lt;code&gt;tags&lt;/code&gt;. Add a field only when it solves an observed retrieval, review, or collaboration problem.&lt;/p&gt;

&lt;p&gt;A large ontology created on day one is usually a maintenance bill disguised as preparation.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Turn mechanical rules into tests
&lt;/h3&gt;

&lt;p&gt;Check required fields, unique IDs, links, file locations, and index coverage with deterministic code. Reserve model judgment for source quality, contradictions, uncertainty, and synthesis.&lt;/p&gt;

&lt;h2&gt;
  
  
  When should you add vector search?
&lt;/h2&gt;

&lt;p&gt;Not on the first day.&lt;/p&gt;

&lt;p&gt;At a modest scale, an index file plus full-text search may be enough. Add BM25, embeddings, reranking, or a graph database when you can name the recurring failure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;known information is repeatedly hard to find&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;the index is too large to navigate&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;vocabulary mismatch defeats keyword search&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;near-duplicate pages keep appearing&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;relationship queries have become central to the work&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is an engineering threshold, not a universal rule. Retrieval infrastructure can become necessary as the corpus, query patterns, and number of collaborators grow. It should remain a rebuildable acceleration layer wherever possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is a durable AI knowledge base?
&lt;/h3&gt;

&lt;p&gt;It is a knowledge system that preserves source provenance, maintains revisable synthesis, records changes, and gives humans and agents explicit rules for updating the collection. Its value comes from accumulated, auditable work—not merely from answering the current query.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does a Markdown wiki replace RAG?
&lt;/h3&gt;

&lt;p&gt;No. A maintained wiki stores conclusions and relationships that should persist between questions. RAG or other retrieval methods help find relevant material at query time. Many systems benefit from both.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why use Git for knowledge management?
&lt;/h3&gt;

&lt;p&gt;Git makes file changes reviewable and recoverable. It can show when an agent changed a claim, compare competing edits, and preserve repository history across clones. It does not replace backups, access controls, or fact-checking.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can several AI agents safely edit the same knowledge base?
&lt;/h3&gt;

&lt;p&gt;They can collaborate more reliably when the repository defines naming, evidence, mutation, indexing, and validation rules. Concurrency still requires ordinary Git discipline and human review for consequential changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  What should be tested automatically?
&lt;/h3&gt;

&lt;p&gt;Automate structural invariants: required metadata, unique IDs, valid links, correct locations, and index coverage. Do not treat a passing linter as proof that a conclusion is true.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this system has—and has not—proved
&lt;/h2&gt;

&lt;p&gt;My current implementation shows that clear layers, a repository protocol, and standard-library checks can let multiple AI coding agents work on the same Markdown assets while leaving reviewable file history.&lt;/p&gt;

&lt;p&gt;It has not proved that the structure will remain sufficient across thousands of pages, years of use, or heavy multi-user concurrency. Vector retrieval may become necessary. The directory tree may need to be split. The schema may grow heavier.&lt;/p&gt;

&lt;p&gt;Those changes should be triggered by observed failures.&lt;/p&gt;

&lt;p&gt;The useful measure of an AI knowledge base is not how many pages it generated on day one. It is whether the system can preserve evidence, correct a conclusion, and let the next conversation continue from work that can still be inspected.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f" rel="noopener noreferrer"&gt;Andrej Karpathy, “LLM Wiki”&lt;/a&gt;, created April 4, 2026; accessed July 25, 2026.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://spec.commonmark.org/0.31.2/" rel="noopener noreferrer"&gt;CommonMark Spec 0.31.2&lt;/a&gt;, January 28, 2024; accessed July 25, 2026.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control" rel="noopener noreferrer"&gt;Pro Git, “About Version Control”&lt;/a&gt;, accessed July 25, 2026.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>git</category>
      <category>markdown</category>
    </item>
    <item>
      <title>What 178 Claude Code Sessions Taught Me About Working With Coding Agents</title>
      <dc:creator>mufeng</dc:creator>
      <pubDate>Fri, 17 Jul 2026 07:40:41 +0000</pubDate>
      <link>https://dev.to/changyou/what-178-claude-code-sessions-taught-me-about-working-with-coding-agents-479l</link>
      <guid>https://dev.to/changyou/what-178-claude-code-sessions-taught-me-about-working-with-coding-agents-479l</guid>
      <description>&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%2Fzvnmae607twpyj4k1ljr.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%2Fzvnmae607twpyj4k1ljr.png" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;How &lt;code&gt;/insights&lt;/code&gt; turned repeated mistakes into &lt;code&gt;CLAUDE.md&lt;/code&gt; rules, reusable Skills, and evidence-driven agent workflows&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I no longer use Claude Code only to complete functions or fix isolated bugs.&lt;/p&gt;

&lt;p&gt;Over the past few months, I have used it across Next.js and TypeScript product work, Swift and iOS release preparation, localization, payments, production debugging, open-source maintenance, and technical writing.&lt;/p&gt;

&lt;p&gt;The tasks became more ambitious, but one problem became harder to see: I remembered why individual sessions succeeded or failed, yet I could not identify the patterns across dozens of them.&lt;/p&gt;

&lt;p&gt;Then I ran:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/insights
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Claude Code analyzed 178 of my 205 sessions, covering 1,412 messages across 43 days, from May 26 to July 15, 2026.&lt;/p&gt;

&lt;p&gt;The report did not write any product code. It did something more useful: it showed me how I work with coding agents, where the collaboration repeatedly breaks down, and which temporary corrections should become permanent engineering rules.&lt;/p&gt;

&lt;p&gt;The main value of &lt;code&gt;/insights&lt;/code&gt; is not another usage dashboard. It is turning scattered session history into a workflow you can change and later verify.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Claude Code Insights actually is
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;/insights&lt;/code&gt; is a built-in Claude Code command. Anthropic describes it as a way to generate a report that analyzes your sessions, including project areas, interaction patterns, and friction points.&lt;/p&gt;

&lt;p&gt;In practice, my report tried to answer questions such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What kinds of projects and tasks do I use Claude Code for?&lt;/li&gt;
&lt;li&gt;Do I ask it to debug, implement, review, or write?&lt;/li&gt;
&lt;li&gt;How do I frame requests and approve changes?&lt;/li&gt;
&lt;li&gt;Which collaboration patterns tend to produce strong outcomes?&lt;/li&gt;
&lt;li&gt;Which mistakes, tool failures, and incorrect assumptions keep returning?&lt;/li&gt;
&lt;li&gt;Which preferences belong in &lt;code&gt;CLAUDE.md&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;Which repeated procedures should become Skills, Hooks, or agent workflows?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That makes Insights closer to an engineering retrospective about the human-agent system than a code-quality scanner.&lt;/p&gt;

&lt;p&gt;It is also different from a team analytics dashboard. Analytics measures adoption, accepted lines of code, activity, and cost. Insights examines the behavior inside your sessions.&lt;/p&gt;

&lt;p&gt;This distinction matters because some parts of the report are facts, while others are model-generated interpretations. “1,412 messages” is a reported count. “You interrogate before you authorize” is a behavioral summary. A claim that this pattern explains a higher satisfaction rate is an inference, not an audited conclusion.&lt;/p&gt;

&lt;p&gt;Treating all three as equally certain would be a mistake.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pattern it found in my work
&lt;/h2&gt;

&lt;p&gt;The report described my default style as “interrogate first, authorize second.”&lt;/p&gt;

&lt;p&gt;I rarely begin with “change the code.” I usually start with a diagnostic question:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why is the system deletion dialog using Chinese?&lt;/li&gt;
&lt;li&gt;Why can users select only the monthly plan?&lt;/li&gt;
&lt;li&gt;Why does this navigation transition look wrong?&lt;/li&gt;
&lt;li&gt;Is this CTA actually helping the page?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Only after Claude Code explains the root cause and shows evidence do I tell it to implement the fix.&lt;/p&gt;

&lt;p&gt;The tool data supported that description: my use of &lt;code&gt;Bash&lt;/code&gt; and &lt;code&gt;Read&lt;/code&gt; was much higher than &lt;code&gt;Write&lt;/code&gt;. I spent more effort investigating and verifying than generating new code.&lt;/p&gt;

&lt;p&gt;That approach led to some of my best sessions. Simulator recordings exposed a first-frame navigation issue. Controlled experiments clarified an iOS system-language behavior. Browser screenshots revealed layout failures. &lt;code&gt;curl&lt;/code&gt; and GitHub API calls replaced plausible explanations with observable evidence.&lt;/p&gt;

&lt;p&gt;But the report also found the weakness: I had never fully encoded this method into the system.&lt;/p&gt;

&lt;p&gt;Requirements such as “always run type checking,” “show a real screenshot for UI work,” and “verify platform behavior with a controlled experiment” still lived mostly in my head. I kept repeating them in new sessions.&lt;/p&gt;

&lt;p&gt;Before Insights, I interpreted that as “Claude misunderstood this task.” After Insights, I saw a different problem: the collaboration contract had never been made persistent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure pattern 1: a small fix becomes a refactor
&lt;/h2&gt;

&lt;p&gt;One request was supposed to change four localized strings. Claude Code expanded it into a refactor of two &lt;code&gt;switch&lt;/code&gt; blocks with twelve cases.&lt;/p&gt;

&lt;p&gt;The code was not necessarily invalid. The direction and scope were wrong.&lt;/p&gt;

&lt;p&gt;Another request asked for an annual payment option. Claude initially implemented a deep link, but I wanted an explicit annual-plan button. The first approach had to be rejected and rolled back.&lt;/p&gt;

&lt;p&gt;Insights grouped these incidents as scope drift. My current approval gate for cross-file work is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Before writing code, list the exact files you would change, what would change
in each file, and every user-visible behavior change. Wait for me to say “go.”

If the work touches more than five files, provide two viable approaches and
explain the trade-offs.

Implement only what I explicitly requested. If you notice adjacent warnings,
refactoring opportunities, or alternative solutions, list them separately and
wait for approval instead of implementing them.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prompt does not make the model more intelligent. It adds a cheap decision point before an expensive diff exists.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure pattern 2: the first plausible explanation wins
&lt;/h2&gt;

&lt;p&gt;While debugging a GitHub OAuth 400 error, one investigation path blamed the local proxy. Later evidence pointed to the Supabase provider configuration.&lt;/p&gt;

&lt;p&gt;This is a familiar debugging failure. Once the first explanation sounds plausible, every subsequent command starts trying to confirm it instead of falsify it.&lt;/p&gt;

&lt;p&gt;For problems that cross application code, configuration, infrastructure, and local tooling, I now prefer mutually exclusive hypotheses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Use three parallel agents to investigate the GitHub OAuth 400 error.

Agent 1: inspect the application code and callback route.
Agent 2: call the Supabase auth endpoint directly with curl.
Agent 3: inspect the network and proxy path.

Each agent must report only its conclusion, the exact commands it ran, and the
raw evidence. Do not propose fixes yet. After all evidence is available, choose
the smallest fix that explains the observations.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Parallelism is not the goal. Killing incorrect branches quickly is the goal.&lt;/p&gt;

&lt;p&gt;Each agent should own one hypothesis and have a clear falsification condition. Without that structure, “use multiple agents” can simply produce several confident opinions at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure pattern 3: reasoning replaces reproduction
&lt;/h2&gt;

&lt;p&gt;My most valuable debugging sessions did not stop at reading code.&lt;/p&gt;

&lt;p&gt;For UI and platform behavior, the evidence often existed outside the source files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A simulator recording revealed the first expanded frame of a navigation bar.&lt;/li&gt;
&lt;li&gt;A controlled simulator experiment clarified the language used by an iOS system dialog.&lt;/li&gt;
&lt;li&gt;A real HTTP response showed whether an upstream service was failing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I converted that lesson into a reusable instruction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Do not infer the cause yet. Reproduce the problem first.

Record the simulator, capture a browser screenshot, or call the endpoint with
curl to prove that the bug exists. Report exactly what you observed, then
propose a fix.

After the fix, repeat the same reproduction and show the before-and-after
evidence.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This moves verification from the end of the task to the entrance condition for root-cause analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure pattern 4: repeated work never becomes a system
&lt;/h2&gt;

&lt;p&gt;Across several sessions, I repeatedly performed the same App Store release checks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;permission-purpose strings;&lt;/li&gt;
&lt;li&gt;hosted Terms, Privacy, and EULA URLs;&lt;/li&gt;
&lt;li&gt;hard-coded prices in paywalls;&lt;/li&gt;
&lt;li&gt;localization completeness across &lt;code&gt;.lproj&lt;/code&gt; files;&lt;/li&gt;
&lt;li&gt;app icon assets;&lt;/li&gt;
&lt;li&gt;version and build-number increments;&lt;/li&gt;
&lt;li&gt;multilingual release notes based on the real Git diff.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Explaining this checklist from scratch every time wastes context and increases the chance of omission.&lt;/p&gt;

&lt;p&gt;The report suggested converting it into a reusable release-audit Skill. The important improvement is not fewer keystrokes. It is running the same release gates every time and receiving evidence in a consistent format.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where each Insight should go
&lt;/h2&gt;

&lt;p&gt;Not every recommendation belongs in &lt;code&gt;CLAUDE.md&lt;/code&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Kind of recommendation&lt;/th&gt;
&lt;th&gt;Best home&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Stable rule relevant to most sessions&lt;/td&gt;
&lt;td&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Run type checking and tests before reporting completion&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Repeatable multi-step procedure&lt;/td&gt;
&lt;td&gt;Skill&lt;/td&gt;
&lt;td&gt;App Store release audit&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deterministic action after an event&lt;/td&gt;
&lt;td&gt;Hook&lt;/td&gt;
&lt;td&gt;Run type checking after file edits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Independent investigation with isolated context&lt;/td&gt;
&lt;td&gt;Subagent&lt;/td&gt;
&lt;td&gt;Test code, configuration, upstream, and environment hypotheses&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This separation follows the roles described in Anthropic’s Claude Code extension documentation: &lt;code&gt;CLAUDE.md&lt;/code&gt; supplies persistent context, Skills package reusable workflows, Hooks respond to lifecycle events, and Subagents run specialized loops in separate contexts.&lt;/p&gt;

&lt;p&gt;Putting everything into one giant instruction file would create a different problem: more context, weaker relevance, and less predictable behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed before and after Insights
&lt;/h2&gt;

&lt;p&gt;There is an important evidence boundary here.&lt;/p&gt;

&lt;p&gt;My material contains detailed evidence from the sessions before I adopted these recommendations. It also contains the report and the workflows I derived from it. It does not yet contain several weeks of post-adoption data.&lt;/p&gt;

&lt;p&gt;I therefore cannot honestly claim that Insights has already reduced my rework by a certain percentage or saved a specific number of hours.&lt;/p&gt;

&lt;p&gt;What has changed is concrete but narrower:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A vague feeling about scope drift became an explicit approval rule.&lt;/li&gt;
&lt;li&gt;A wrong proxy hypothesis became a falsification-first debugging workflow.&lt;/li&gt;
&lt;li&gt;Repeated preferences became candidates for &lt;code&gt;CLAUDE.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A scattered release process became a Skill specification.&lt;/li&gt;
&lt;li&gt;Long tasks that previously died with the session now have staged checkpoints and written state.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The durable engineering effects still need to be measured.&lt;/p&gt;

&lt;p&gt;In the next cycle, I can compare unrelated diff size, rollback frequency, repeated instruction count, evidence attached to root-cause claims, and recovery cost after interrupted sessions.&lt;/p&gt;

&lt;p&gt;That is a more defensible before-and-after story than turning recommendations into fictional results.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical way to use &lt;code&gt;/insights&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;The command is simple:&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="nb"&gt;cd&lt;/span&gt; /path/to/your/project
claude
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/insights
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The useful work begins after the report appears:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Check the sample.&lt;/strong&gt; Confirm the number of sessions and the time range. A few sessions can make an accident look like a habit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read friction before praise.&lt;/strong&gt; The flattering sections are easy to accept; recurring failures are more actionable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Separate counts from interpretations.&lt;/strong&gt; Label what is measured, what is summarized, and what is inferred.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose one to three changes.&lt;/strong&gt; Do not redesign your entire agent workflow in one pass.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Put each change in the right mechanism.&lt;/strong&gt; Use &lt;code&gt;CLAUDE.md&lt;/code&gt;, a Skill, a Hook, or a Subagent deliberately.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Define a verification metric.&lt;/strong&gt; Decide what would prove that the change helped.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run Insights again later.&lt;/strong&gt; Treat the first report as a baseline, not a verdict.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For long-running work, I would add one more rule: write findings, decisions, remaining tasks, and verification output to a file while the work is happening. Several of my sessions were interrupted by usage limits, output limits, or terminated background processes. A saved checkpoint makes interruption recoverable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits worth keeping in mind
&lt;/h2&gt;

&lt;p&gt;Insights can analyze what happened in the recorded sessions. It cannot automatically prove that the business outcome succeeded.&lt;/p&gt;

&lt;p&gt;It may notice that you run tests frequently, but it cannot replace an audit of test quality. It may recommend parallel agents, but parallelism costs resources and is a poor fit for work with tight sequential dependencies.&lt;/p&gt;

&lt;p&gt;Its interpretations can also be wrong. A report should generate hypotheses about your workflow, not become an unquestionable source of truth.&lt;/p&gt;

&lt;p&gt;Finally, review the report before sharing it. Session-derived reports and screenshots may expose project names, file paths, customer information, endpoints, tokens, account details, or unreleased products.&lt;/p&gt;

&lt;h2&gt;
  
  
  The real benefit
&lt;/h2&gt;

&lt;p&gt;The most useful sentence in my report was not that I was “good at debugging.” It was the implication behind the evidence: I had developed a repeatable way of working with coding agents, but I had not yet encoded it into a system the tools could execute consistently.&lt;/p&gt;

&lt;p&gt;That is where &lt;code&gt;/insights&lt;/code&gt; becomes valuable.&lt;/p&gt;

&lt;p&gt;It turns “Claude sometimes goes off track” into named failure modes. It turns repeated corrections into persistent rules. It turns recurring tasks into reusable workflows. And it gives you a baseline for checking whether the next version of your process is actually better.&lt;/p&gt;

&lt;p&gt;Generate the report once for awareness. Run it again later for evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.claude.com/docs/en/commands" rel="noopener noreferrer"&gt;Commands — Claude Code Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.claude.com/docs/en/features-overview" rel="noopener noreferrer"&gt;Extend Claude Code&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.claude.com/docs/en/changelog" rel="noopener noreferrer"&gt;Claude Code Changelog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>claudecode</category>
      <category>codex</category>
    </item>
    <item>
      <title>DESIGN.md: Stop Letting AI Guess What Your UI Should Look Like</title>
      <dc:creator>mufeng</dc:creator>
      <pubDate>Thu, 16 Jul 2026 08:54:38 +0000</pubDate>
      <link>https://dev.to/changyou/designmd-stop-letting-ai-guess-what-your-ui-should-look-like-9n1</link>
      <guid>https://dev.to/changyou/designmd-stop-letting-ai-guess-what-your-ui-should-look-like-9n1</guid>
      <description>&lt;p&gt;&lt;em&gt;A practical workflow for turning visual intent into a versioned, lintable contract for coding agents.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I started with one broken token reference:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;button-primary&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{colors.action}"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There was no &lt;code&gt;colors.action&lt;/code&gt; token.&lt;/p&gt;

&lt;p&gt;Google's official DESIGN.md linter caught it immediately:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Reference {colors.action} does not resolve to any defined token.
errors: 1, warnings: 1, infos: 2
exit code: 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That small failure captures the point of &lt;code&gt;DESIGN.md&lt;/code&gt; better than a polished demo does.&lt;/p&gt;

&lt;p&gt;AI coding tools can already produce a working page. The harder problem is getting five pages to feel like the same product, then preserving that consistency across new sessions, new agents, and later revisions.&lt;/p&gt;

&lt;p&gt;Most teams try to solve this by adding more adjectives to the prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Make it modern, clean, premium, and similar to a top-tier SaaS product.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The prompt is not too short. It is too ambiguous.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DESIGN.md&lt;/code&gt; replaces that ambiguity with a file that humans can review, agents can read, Git can version, and tools can validate.&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%2Fpxmkuhshpna7fvw9jgcj.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%2Fpxmkuhshpna7fvw9jgcj.png" alt="Four project documents flowing through design tokens into a structured interface" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What DESIGN.md actually is
&lt;/h2&gt;

&lt;p&gt;Google Labs describes &lt;code&gt;DESIGN.md&lt;/code&gt; as a format for communicating visual identity to coding agents.&lt;/p&gt;

&lt;p&gt;A conforming file has two layers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;YAML front matter containing machine-readable colors, typography, spacing, radii, and component tokens.&lt;/li&gt;
&lt;li&gt;Markdown prose describing the design intent, component semantics, responsive behavior, and explicit do's and don'ts.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A small file might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;alpha&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Signal Desk&lt;/span&gt;
&lt;span class="na"&gt;colors&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;primary&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;#182230"&lt;/span&gt;
  &lt;span class="na"&gt;tertiary&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;#5B5BD6"&lt;/span&gt;
  &lt;span class="na"&gt;surface&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;#FFFFFF"&lt;/span&gt;
&lt;span class="na"&gt;rounded&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;sm&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;6px&lt;/span&gt;
&lt;span class="na"&gt;components&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;button-primary&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{colors.tertiary}"&lt;/span&gt;
    &lt;span class="na"&gt;textColor&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{colors.surface}"&lt;/span&gt;
    &lt;span class="na"&gt;rounded&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{rounded.sm}"&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;

&lt;span class="gu"&gt;## Overview&lt;/span&gt;

Signal Desk should feel like an operations notebook crossed with a quiet
avionics panel: compact, factual, and calm under pressure.
It is not a glossy marketing dashboard.

&lt;span class="gu"&gt;## Do's and Don'ts&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Do make the release state legible before secondary metrics.
&lt;span class="p"&gt;-&lt;/span&gt; Don't add gradients, glass blur, glowing borders, or decorative charts.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tokens and prose do different jobs.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tokens define &lt;strong&gt;what to use&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Rationale explains &lt;strong&gt;why it should be used that way&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Negative constraints define &lt;strong&gt;what the result must not become&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tokens alone reduce a design system to a palette. Prose alone leaves exact values open to interpretation. Together they form a visual contract.&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%2F1r9qsjiv84hwdu6vnsw5.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%2F1r9qsjiv84hwdu6vnsw5.png" alt="A vague prompt becoming a constrained DESIGN.md and then a consistent UI" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this improves AI-generated UI
&lt;/h2&gt;

&lt;p&gt;This is an engineering explanation based on the public specification and the project described below. It is not a model-vendor benchmark, and &lt;code&gt;DESIGN.md&lt;/code&gt; does not guarantee good taste.&lt;/p&gt;

&lt;p&gt;What it does is reduce four kinds of guessing.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. It reduces hidden degrees of freedom
&lt;/h3&gt;

&lt;p&gt;Ask for a "modern dashboard" and the model still has to choose the font, scale, palette, density, radii, shadows, motion, and responsive behavior.&lt;/p&gt;

&lt;p&gt;Every unspecified decision is another opportunity for drift.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DESIGN.md&lt;/code&gt; narrows the design space before implementation begins. The model is no longer sampling from the average visual language of the web. It is working inside a smaller, explicit system.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. It turns taste into semantic rules
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;#5B5BD6&lt;/code&gt; is only a color value. It becomes a rule when the file says that indigo is reserved for the single primary action and the current selection.&lt;/p&gt;

&lt;p&gt;Likewise:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Do not turn every metric into a floating card" is more actionable than "use fewer cards."&lt;/li&gt;
&lt;li&gt;"Status must include text and cannot rely on color alone" is more testable than "remember accessibility."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The value is not more description. It is more operational description.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. It persists across sessions
&lt;/h3&gt;

&lt;p&gt;A chat prompt is temporary. A repository file is durable.&lt;/p&gt;

&lt;p&gt;Once design decisions live in the project, the next session, another agent, and a code reviewer can all work from the same source of truth. Git also makes those decisions diffable and reversible.&lt;/p&gt;

&lt;p&gt;Google's CLI currently supports &lt;code&gt;lint&lt;/code&gt;, &lt;code&gt;diff&lt;/code&gt;, and token export. That moves part of design-system maintenance out of memory and into a normal engineering workflow.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. It creates a verification loop
&lt;/h3&gt;

&lt;p&gt;"The colors feel inconsistent" is hard to put into CI.&lt;/p&gt;

&lt;p&gt;An unresolved &lt;code&gt;{colors.action}&lt;/code&gt; reference is not.&lt;/p&gt;

&lt;p&gt;Once visual rules become structured data, tooling can catch broken references, missing typography, contrast problems, and structural mistakes before the agent produces more code from a bad contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four-file setup
&lt;/h2&gt;

&lt;p&gt;The useful setup is not four overlapping instruction manuals. Each file should own a different question.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;project/
├── README.md
├── AGENTS.md
├── DESIGN.md
├── CLAUDE.md
└── src/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Question it answers&lt;/th&gt;
&lt;th&gt;What belongs there&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;README.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;What are we building?&lt;/td&gt;
&lt;td&gt;Users, product goal, scope, setup, acceptance criteria&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;AGENTS.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;How should code be changed?&lt;/td&gt;
&lt;td&gt;Architecture, commands, tests, boundaries, security rules&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;DESIGN.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;What should the product look and feel like?&lt;/td&gt;
&lt;td&gt;Tokens, rationale, component semantics, responsive rules, anti-patterns&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;CLAUDE.md&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;How should Claude Code consume the project context?&lt;/td&gt;
&lt;td&gt;Shared-rule imports and Claude-specific workflow notes&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&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%2Foky241qlduaaweogtkfw.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%2Foky241qlduaaweogtkfw.png" alt="README, AGENTS, DESIGN, and CLAUDE files converging on one implementation" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One detail matters here: Claude Code's official documentation says it reads &lt;code&gt;CLAUDE.md&lt;/code&gt;, not &lt;code&gt;AGENTS.md&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If the repository already uses &lt;code&gt;AGENTS.md&lt;/code&gt;, Anthropic recommends importing it rather than maintaining a duplicate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;@AGENTS.md

&lt;span class="gu"&gt;## Claude Code&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Summarize the constraints in README.md and DESIGN.md before changing UI code.
&lt;span class="p"&gt;-&lt;/span&gt; Do not replace specific design rules with generic "modern SaaS" styling.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Codex discovers &lt;code&gt;AGENTS.md&lt;/code&gt; files and merges instructions along the directory hierarchy.&lt;/p&gt;

&lt;p&gt;That makes &lt;code&gt;CLAUDE.md&lt;/code&gt; a good adapter layer. Copying all of &lt;code&gt;AGENTS.md&lt;/code&gt; into it creates two sources of truth. When only one copy gets updated, the model receives conflicting context.&lt;/p&gt;

&lt;h2&gt;
  
  
  A working example: Signal Desk
&lt;/h2&gt;

&lt;p&gt;I tested the approach with a small release-status website called Signal Desk.&lt;/p&gt;

&lt;p&gt;The implementation uses only HTML and CSS. No React, Tailwind, component library, external font, or generated product screenshot. Keeping the stack small made it easier to separate the effect of project context from the capabilities of a framework.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: define the product boundary
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;README.md&lt;/code&gt; describes the job and acceptance criteria:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Signal Desk&lt;/span&gt;

A one-page release status dashboard for independent developers.
Users should understand the current version, outstanding risk,
recent releases, and the next action within ten seconds.

&lt;span class="gu"&gt;## Acceptance criteria&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Use native HTML and CSS with no third-party assets.
&lt;span class="p"&gt;-&lt;/span&gt; Support 375px mobile and 1440px desktop widths.
&lt;span class="p"&gt;-&lt;/span&gt; Keep the page keyboard-accessible with visible focus states.
&lt;span class="p"&gt;-&lt;/span&gt; Follow the information hierarchy in DESIGN.md.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This comes first for a reason. A detailed design system cannot rescue an undefined product. It can only help the agent build the wrong product more consistently.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: define the engineering contract
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;AGENTS.md&lt;/code&gt; owns implementation and verification rules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;## Implementation&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Use semantic HTML before ARIA attributes.
&lt;span class="p"&gt;-&lt;/span&gt; Keep CSS tokens in &lt;span class="sb"&gt;`:root`&lt;/span&gt;; token names must map to &lt;span class="sb"&gt;`DESIGN.md`&lt;/span&gt;.
&lt;span class="p"&gt;-&lt;/span&gt; Support 375px and 1440px viewports without horizontal scrolling.
&lt;span class="p"&gt;-&lt;/span&gt; Preserve visible &lt;span class="sb"&gt;`:focus-visible`&lt;/span&gt; states and reduced-motion behavior.

&lt;span class="gu"&gt;## Verification&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Run &lt;span class="sb"&gt;`npx @google/design.md lint DESIGN.md`&lt;/span&gt; after editing the design contract.
&lt;span class="p"&gt;-&lt;/span&gt; Verify that actions, warnings, and status labels do not rely on color alone.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice what is missing: background colors, radii, and card styling. Those belong in &lt;code&gt;DESIGN.md&lt;/code&gt;, not in the engineering instructions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: give the design a specific world
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;Overview&lt;/code&gt; does not say "modern, professional, premium."&lt;/p&gt;

&lt;p&gt;It says:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;Signal Desk should feel like an operations notebook crossed with a quiet
avionics panel: compact, factual, calm under pressure.
It is not a glossy marketing dashboard.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That reference naturally suggests a warm paper-like canvas, dark ink, sparse status color, compact information density, restrained corners, and no glassmorphism or decorative charts.&lt;/p&gt;

&lt;p&gt;Google's DESIGN.md philosophy makes the same point: a specific reference carries more useful information than a broad list of adjectives.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: implement and inspect the result
&lt;/h3&gt;

&lt;p&gt;The final page puts release state at the top of the hierarchy and keeps one primary action above the fold. Versions and timestamps use monospace. Success and rollback states combine color with labels. Borders and tonal shifts create structure without floating-card effects.&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%2Fe1jmbg6bqw30urbma5hl.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%2Fe1jmbg6bqw30urbma5hl.png" alt="The real Signal Desk page built for this test" width="800" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a real local browser capture from the project. The interface copy is Chinese, but the behavior of the design contract is language-independent.&lt;/p&gt;

&lt;p&gt;The screenshot does not prove that &lt;code&gt;DESIGN.md&lt;/code&gt; beats every possible prompt. It proves a narrower claim: the four-file contract can produce a running artifact whose design decisions can be traced back to versioned project files.&lt;/p&gt;

&lt;h2&gt;
  
  
  The failure was more useful than the first render
&lt;/h2&gt;

&lt;p&gt;The intentionally broken &lt;code&gt;{colors.action}&lt;/code&gt; reference failed lint as expected.&lt;/p&gt;

&lt;p&gt;After fixing it, the linter still reported four warnings. The &lt;code&gt;neutral&lt;/code&gt;, &lt;code&gt;line&lt;/code&gt;, &lt;code&gt;success&lt;/code&gt;, and &lt;code&gt;warning&lt;/code&gt; tokens existed but were not referenced by any component.&lt;/p&gt;

&lt;p&gt;That exposed a common design-system mistake: more tokens do not automatically mean more control. An unused token is inventory, not a working rule.&lt;/p&gt;

&lt;p&gt;I added semantic component mappings for &lt;code&gt;page&lt;/code&gt;, &lt;code&gt;divider&lt;/code&gt;, &lt;code&gt;status-success&lt;/code&gt;, and &lt;code&gt;status-warning&lt;/code&gt;. The final result was:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;errors: 0, warnings: 0, infos: 1
exit code: 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fvtu3xeo3dd65tk44gl02.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%2Fvtu3xeo3dd65tk44gl02.png" alt="The real lint record from failure to a clean result" width="800" height="514"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Three practical lessons came out of that loop:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;DESIGN.md&lt;/code&gt; has to evolve with real components. It should not expand independently of the product.&lt;/li&gt;
&lt;li&gt;A small number of high-value tokens with semantic component mappings is better than hundreds of copied variables.&lt;/li&gt;
&lt;li&gt;Passing lint proves structural validity, not visual quality. Responsive inspection, accessibility checks, and human review still matter.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Do not copy another company's visual identity
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;awesome-design-md&lt;/code&gt; repository is useful for studying how detailed design documents are structured. Its files are extracted from publicly visible websites and provided as-is. The repository explicitly says it does not claim ownership of those visual identities.&lt;/p&gt;

&lt;p&gt;The safe use is to study decisions, not clone a brand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How are primary and secondary actions distinguished with few colors?&lt;/li&gt;
&lt;li&gt;How do type scale and spacing establish hierarchy?&lt;/li&gt;
&lt;li&gt;How are interaction states, responsive behavior, and accessibility described?&lt;/li&gt;
&lt;li&gt;Which rules are general principles, and which belong to that specific company?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Vercel's public &lt;code&gt;/design.md&lt;/code&gt; is a useful large example. It documents the light Geist system through color scales, typography, radii, spacing, and component tokens. It also points to a separate dark-theme document.&lt;/p&gt;

&lt;p&gt;It is not a universal starter template. Vercel's own Web Interface Guidelines explicitly separate general interface guidance from Vercel-specific preferences.&lt;/p&gt;

&lt;p&gt;Study how constraints are expressed. Do not copy the identity they protect.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical adoption sequence
&lt;/h2&gt;

&lt;p&gt;If you want to introduce &lt;code&gt;DESIGN.md&lt;/code&gt; into an existing app or website, use this order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Choose one bounded screen.&lt;/strong&gt; Start with a login, settings, dashboard, or detail page.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extract facts from the current product.&lt;/strong&gt; Record the colors, type, spacing, radii, and states that actually exist.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write the Overview and Don'ts first.&lt;/strong&gt; Define a concrete reference and the five to ten failure modes agents repeat most often.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add the minimum useful tokens.&lt;/strong&gt; Only add values used by the first screen, then map them to semantic components.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Put verification in &lt;code&gt;AGENTS.md&lt;/code&gt;.&lt;/strong&gt; State when lint runs and which viewports, states, and accessibility rules must be checked.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep &lt;code&gt;CLAUDE.md&lt;/code&gt; thin.&lt;/strong&gt; Import shared rules and add only tool-specific instructions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review design changes with diff.&lt;/strong&gt; Run the official command before accepting token or semantic changes:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @google/design.md diff DESIGN.md DESIGN-v2.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Design-system changes should be reviewed like API changes. They should not appear silently inside one generation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What DESIGN.md cannot solve
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;DESIGN.md&lt;/code&gt; is not a replacement for Figma, user research, information architecture, content design, or interaction prototyping.&lt;/p&gt;

&lt;p&gt;It is also context, not enforcement. Anthropic makes this distinction explicitly for &lt;code&gt;CLAUDE.md&lt;/code&gt;: instructions guide model behavior, but they are not a hard configuration layer. The same caution applies to any file an agent reads.&lt;/p&gt;

&lt;p&gt;Specific, concise, non-conflicting rules improve the odds of compliance. They do not guarantee it.&lt;/p&gt;

&lt;p&gt;The useful scope is narrower:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make fewer visual decisions implicit.&lt;/li&gt;
&lt;li&gt;Keep design language stable across pages and sessions.&lt;/li&gt;
&lt;li&gt;Put visual intent under version control and review.&lt;/li&gt;
&lt;li&gt;Catch some contract errors before they spread into implementation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The real gain is not that &lt;code&gt;DESIGN.md&lt;/code&gt; raises the model's aesthetic ceiling. It raises the quality of the constraints around the model.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;README.md&lt;/code&gt; defines what to build. &lt;code&gt;AGENTS.md&lt;/code&gt; defines how to work. &lt;code&gt;DESIGN.md&lt;/code&gt; defines what the result should look and feel like. &lt;code&gt;CLAUDE.md&lt;/code&gt; adapts those shared rules for Claude Code.&lt;/p&gt;

&lt;p&gt;That is how a one-off prompt becomes maintainable project context.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/google-labs-code/design.md" rel="noopener noreferrer"&gt;Google Labs: DESIGN.md specification and CLI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/google-labs-code/design.md/blob/main/PHILOSOPHY.md" rel="noopener noreferrer"&gt;Google Labs: DESIGN.md Philosophy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://vercel.com/design.md" rel="noopener noreferrer"&gt;Vercel: Geist DESIGN.md&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://vercel.com/design/guidelines" rel="noopener noreferrer"&gt;Vercel: Web Interface Guidelines&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.openai.com/codex/guides/agents-md" rel="noopener noreferrer"&gt;OpenAI: Custom instructions with AGENTS.md&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.claude.com/docs/en/memory" rel="noopener noreferrer"&gt;Anthropic: How Claude remembers your project&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/voltagent/awesome-design-md" rel="noopener noreferrer"&gt;VoltAgent: awesome-design-md&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mufeng.blog/article/design-md-ai-ui-development" rel="noopener noreferrer"&gt;design-md-ai-ui-development&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>claudecode</category>
      <category>codex</category>
      <category>designsystems</category>
    </item>
    <item>
      <title>Loop Engineering: Turning /goal and /loop into Verifiable AI Agent Workflows</title>
      <dc:creator>mufeng</dc:creator>
      <pubDate>Tue, 07 Jul 2026 10:46:52 +0000</pubDate>
      <link>https://dev.to/changyou/loop-engineering-turning-goal-and-loop-into-verifiable-ai-agent-workflows-1519</link>
      <guid>https://dev.to/changyou/loop-engineering-turning-goal-and-loop-into-verifiable-ai-agent-workflows-1519</guid>
      <description>&lt;p&gt;Loop Engineering is becoming one of those terms that spreads faster than its definition.&lt;/p&gt;

&lt;p&gt;That usually creates two bad outcomes. Some people dismiss it as another AI buzzword. Others treat it as magic: prepend &lt;code&gt;/loop&lt;/code&gt; to a prompt and expect an agent to ship production-ready work while they sleep.&lt;/p&gt;

&lt;p&gt;Both readings are wrong.&lt;/p&gt;

&lt;p&gt;The practical definition is simpler:&lt;/p&gt;

&lt;p&gt;Loop Engineering is the practice of designing AI agent work as a repeatable cycle with a clear goal, bounded action, verification, state persistence, and stop rules.&lt;/p&gt;

&lt;p&gt;In other words, it is not a prompt trick. It is an engineering discipline for long-running AI work.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: You Are Still the Loop
&lt;/h2&gt;

&lt;p&gt;Most developers use coding agents like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Write a prompt.&lt;/li&gt;
&lt;li&gt;Let the agent edit code.&lt;/li&gt;
&lt;li&gt;Run tests manually.&lt;/li&gt;
&lt;li&gt;Paste the failure back.&lt;/li&gt;
&lt;li&gt;Ask the agent to try again.&lt;/li&gt;
&lt;li&gt;Repeat until it works or you give up.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It looks like the AI is doing the work. In reality, you are still the scheduler, QA engineer, state manager, and stop-condition checker.&lt;/p&gt;

&lt;p&gt;The agent executes single instructions. You decide whether the result is correct, whether the next step should happen, which error matters, what changed, and when the task is done.&lt;/p&gt;

&lt;p&gt;Loop Engineering moves those responsibilities out of your head and into an explicit workflow.&lt;/p&gt;

&lt;p&gt;A good loop answers these questions before the agent starts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What does done mean?&lt;/li&gt;
&lt;li&gt;What is the allowed scope?&lt;/li&gt;
&lt;li&gt;What should happen in each iteration?&lt;/li&gt;
&lt;li&gt;How will the result be verified?&lt;/li&gt;
&lt;li&gt;Where is progress recorded?&lt;/li&gt;
&lt;li&gt;When should the agent stop?&lt;/li&gt;
&lt;li&gt;Which actions require human approval?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the shift. Prompt Engineering tries to improve one response. Loop Engineering tries to make multiple responses converge toward a verifiable result.&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%2Fzjplu0nv23g8a3jfzib4.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%2Fzjplu0nv23g8a3jfzib4.png" alt="Single prompt versus engineered agent loop" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Vocabulary That Matters
&lt;/h2&gt;

&lt;p&gt;Before talking about &lt;code&gt;/goal&lt;/code&gt; and &lt;code&gt;/loop&lt;/code&gt;, it helps to separate several related concepts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prompt Engineering
&lt;/h3&gt;

&lt;p&gt;Prompt Engineering is writing a good single instruction.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Fix the failing tests in the auth module and explain what changed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This can work for a small task. But it does not define the scope, verification method, failure policy, or stop condition.&lt;/p&gt;

&lt;p&gt;For one-shot requests, that may be fine. For multi-step coding work, it is fragile.&lt;/p&gt;

&lt;h3&gt;
  
  
  Context Engineering
&lt;/h3&gt;

&lt;p&gt;Context Engineering is deciding what the model sees at each step: instructions, files, tool outputs, memory, logs, retrieval results, MCP data, and previous state.&lt;/p&gt;

&lt;p&gt;Long-running agents produce new context every turn. If you simply keep adding more history, the model gets more noise, not more clarity.&lt;/p&gt;

&lt;p&gt;Good context engineering keeps high-signal information and externalizes state into files the agent can reread.&lt;/p&gt;

&lt;h3&gt;
  
  
  Harness Engineering
&lt;/h3&gt;

&lt;p&gt;The harness is the environment the agent runs inside.&lt;/p&gt;

&lt;p&gt;For coding agents, that usually means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Project instructions: &lt;code&gt;CLAUDE.md&lt;/code&gt;, &lt;code&gt;AGENTS.md&lt;/code&gt;, or similar files&lt;/li&gt;
&lt;li&gt;Permission rules: what the agent can run automatically and what requires approval&lt;/li&gt;
&lt;li&gt;Tooling: MCP servers, browser access, GitHub, databases, design tools&lt;/li&gt;
&lt;li&gt;Hooks: format after edit, lint before commit, log tool calls&lt;/li&gt;
&lt;li&gt;Subagents: separate contexts for review, research, and verification&lt;/li&gt;
&lt;li&gt;Memory: durable project decisions and recurring preferences&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The loop runs on top of the harness. Without a harness, the agent has to guess your project structure, commands, conventions, and boundaries every time.&lt;/p&gt;

&lt;p&gt;Guessing is where many agent failures begin.&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%2Fu8s4ijtzvi43ywfcl4id.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%2Fu8s4ijtzvi43ywfcl4id.png" alt="Harness, verifier, and tool boundary for AI agent loops" width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Loop Engineering
&lt;/h3&gt;

&lt;p&gt;At its smallest, a loop looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Read goal -&amp;gt; act -&amp;gt; verify -&amp;gt; write state -&amp;gt; continue or stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is not the same as a traditional script.&lt;/p&gt;

&lt;p&gt;A script repeats fixed steps. A looped agent evaluates state, chooses the next action, handles errors, and updates the plan.&lt;/p&gt;

&lt;p&gt;That flexibility is useful. It is also dangerous if you do not define boundaries.&lt;/p&gt;

&lt;h3&gt;
  
  
  Verifier
&lt;/h3&gt;

&lt;p&gt;The verifier is the evidence layer.&lt;/p&gt;

&lt;p&gt;It should not ask, "Do you think this is done?" It should check evidence:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Did the tests pass?&lt;/li&gt;
&lt;li&gt;Did the build pass?&lt;/li&gt;
&lt;li&gt;Did the diff stay inside the allowed scope?&lt;/li&gt;
&lt;li&gt;Do the links open?&lt;/li&gt;
&lt;li&gt;Does the screenshot match the target state?&lt;/li&gt;
&lt;li&gt;Does the implementation satisfy the written acceptance criteria?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The best verifier is often separated from the worker. If the same agent writes the code and judges the result in the same context, it can rationalize its own mistakes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Memory and State
&lt;/h3&gt;

&lt;p&gt;Memory and state are related, but they are not the same.&lt;/p&gt;

&lt;p&gt;Memory is long-term project knowledge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;team preferences&lt;/li&gt;
&lt;li&gt;architectural decisions&lt;/li&gt;
&lt;li&gt;recurring constraints&lt;/li&gt;
&lt;li&gt;things the agent should remember across sessions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;State is current task progress:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what has been done&lt;/li&gt;
&lt;li&gt;what failed&lt;/li&gt;
&lt;li&gt;what is blocked&lt;/li&gt;
&lt;li&gt;what the next iteration should read first&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A useful minimal setup is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AGENTS.md or CLAUDE.md       # long-term project rules
LOOP-STATE.md               # current loop progress
IMPLEMENTATION_PLAN.md      # current plan and checklist
logs/                       # iteration logs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without state, a loop often becomes a repetition machine. It looks busy but keeps rediscovering the same facts.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stop Rules
&lt;/h3&gt;

&lt;p&gt;Stop rules are the brakes.&lt;/p&gt;

&lt;p&gt;Every loop needs at least two kinds:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Success stop: what evidence proves the task is complete&lt;/li&gt;
&lt;li&gt;Failure stop: when the agent should stop trying and return control to a human&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Success:
- pnpm test auth passes
- auth coverage stays above 80%
- git diff only touches lib/auth and tests/auth

Failure:
- the same test fails 3 times without a new hypothesis
- database migrations need to be modified
- a new production dependency is required
- 8 iterations pass without meeting the goal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An agent loop without stop rules is not automation. It is a cost risk.&lt;/p&gt;

&lt;h2&gt;
  
  
  /goal vs /loop
&lt;/h2&gt;

&lt;p&gt;In Claude Code, &lt;code&gt;/goal&lt;/code&gt; and &lt;code&gt;/loop&lt;/code&gt; represent two different loop shapes.&lt;/p&gt;

&lt;p&gt;According to the Claude Code documentation, &lt;code&gt;/goal&lt;/code&gt; sets a completion condition. Claude keeps working and checks after each turn whether the goal has been reached.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/loop&lt;/code&gt; runs a prompt repeatedly at an interval inside the current Claude Code session. It is better for polling, monitoring, reminders, or waiting for external state changes.&lt;/p&gt;

&lt;p&gt;The short version:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Core question&lt;/th&gt;
&lt;th&gt;Stop condition&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/goal&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;What state counts as done?&lt;/td&gt;
&lt;td&gt;Goal reached or failure rule triggered&lt;/td&gt;
&lt;td&gt;migrations, failing tests, docs, issue cleanup&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/loop&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;How often should this be checked?&lt;/td&gt;
&lt;td&gt;external event, human stop, explicit rule&lt;/td&gt;
&lt;td&gt;deployment checks, PR monitoring, scheduled review&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;There is an important portability detail.&lt;/p&gt;

&lt;p&gt;The engineering pattern transfers across tools. The command names do not.&lt;/p&gt;

&lt;p&gt;Claude Code has &lt;code&gt;/goal&lt;/code&gt; and &lt;code&gt;/loop&lt;/code&gt; in its documentation. Codex emphasizes &lt;code&gt;AGENTS.md&lt;/code&gt;, Automations, Subagents, Workflows, and CLI workflows. Do not assume every agent tool exposes the same slash commands.&lt;/p&gt;

&lt;p&gt;Write portable loop specifications, then map them to the tool you are using.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Use /goal
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;/goal&lt;/code&gt; when the task has a verifiable endpoint.&lt;/p&gt;

&lt;p&gt;Bad:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/goal make the project better
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Good:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/goal auth migration is complete:

Done when:
- all new password writes use argon2id
- legacy bcrypt hashes are rehashed after the next successful login
- pnpm test auth passes
- tests cover migration, failed login, and legacy hash compatibility

Scope:
- only edit lib/auth, tests/auth, docs/auth-migration.md
- do not edit merged db/migrations
- do not change the session cookie format

Verification:
- run pnpm test auth after each change
- inspect git diff for out-of-scope files
- if tests fail, diagnose before editing again

Stop:
- stop when all done conditions pass
- stop if the same failure repeats 3 times
- stop before adding production dependencies
- stop after 8 iterations

State:
- maintain LOOP-STATE.md
- update done, blocked, and next-step items after every iteration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The point is not verbosity. The point is verifiability.&lt;/p&gt;

&lt;p&gt;If your goal cannot be checked by tests, builds, diffs, file content, screenshots, link checks, metrics, or clear human acceptance criteria, it is not ready for a loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Use /loop
&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;/loop&lt;/code&gt; when the main job is to check something repeatedly.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/loop 5m check whether production deployment is complete:

Each iteration:
- inspect the latest GitHub Actions workflow for this branch
- if it is still running, record the current job and elapsed time
- if it succeeded, check whether the production homepage returns 200
- if production is healthy, report success and stop
- if the workflow failed, summarize the failed log and stop

Stop:
- deployment succeeds and health check passes
- workflow fails
- 12 iterations pass without completion
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Typical &lt;code&gt;/loop&lt;/code&gt; tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;check deployment status every 5 minutes&lt;/li&gt;
&lt;li&gt;monitor whether a PR has new review comments&lt;/li&gt;
&lt;li&gt;generate a daily project status summary&lt;/li&gt;
&lt;li&gt;watch whether an external service has recovered&lt;/li&gt;
&lt;li&gt;periodically process failed jobs or logs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bad &lt;code&gt;/loop&lt;/code&gt; tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one-shot questions&lt;/li&gt;
&lt;li&gt;vague ideation&lt;/li&gt;
&lt;li&gt;high-risk production changes&lt;/li&gt;
&lt;li&gt;product direction decisions without human context&lt;/li&gt;
&lt;li&gt;"keep improving this" with no stop condition&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;"Keep improving this" is one of the most dangerous instructions you can give to an autonomous agent. It has no endpoint, no boundary, and no cost ceiling.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Reusable Loop Spec Template
&lt;/h2&gt;

&lt;p&gt;For serious work, put the loop spec in a file such as &lt;code&gt;PROMPT.md&lt;/code&gt;, &lt;code&gt;LOOP-SPEC.md&lt;/code&gt;, or &lt;code&gt;IMPLEMENTATION_PLAN.md&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Goal&lt;/span&gt;

Describe the final state in one or two sentences.
Do not write "improve this." Write what evidence must be true.

&lt;span class="gu"&gt;## Work Scope&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Readable directories:
&lt;span class="p"&gt;-&lt;/span&gt; Editable directories:
&lt;span class="p"&gt;-&lt;/span&gt; Forbidden directories:
&lt;span class="p"&gt;-&lt;/span&gt; Actions requiring human approval:

&lt;span class="gu"&gt;## Work Method&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Process one subtask per iteration
&lt;span class="p"&gt;-&lt;/span&gt; Read the existing implementation before editing
&lt;span class="p"&gt;-&lt;/span&gt; Prefer existing project patterns
&lt;span class="p"&gt;-&lt;/span&gt; Do not add dependencies unless you stop and explain why

&lt;span class="gu"&gt;## Verification&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Commands to run each iteration:
&lt;span class="p"&gt;-&lt;/span&gt; Files to inspect:
&lt;span class="p"&gt;-&lt;/span&gt; Evidence to preserve:
&lt;span class="p"&gt;-&lt;/span&gt; Retry policy when verification fails:

&lt;span class="gu"&gt;## State&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Read LOOP-STATE.md at the start of each iteration
&lt;span class="p"&gt;-&lt;/span&gt; Update LOOP-STATE.md at the end of each iteration
&lt;span class="p"&gt;-&lt;/span&gt; Allowed states: todo, doing, done, blocked, needs-human

&lt;span class="gu"&gt;## Stop Rules&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Success stop:
&lt;span class="p"&gt;-&lt;/span&gt; Failure stop:
&lt;span class="p"&gt;-&lt;/span&gt; Max iterations:
&lt;span class="p"&gt;-&lt;/span&gt; Max budget:
&lt;span class="p"&gt;-&lt;/span&gt; Conditions requiring human intervention:

&lt;span class="gu"&gt;## Report&lt;/span&gt;

At the end, report:
&lt;span class="p"&gt;-&lt;/span&gt; what was completed
&lt;span class="p"&gt;-&lt;/span&gt; verification evidence
&lt;span class="p"&gt;-&lt;/span&gt; blockers
&lt;span class="p"&gt;-&lt;/span&gt; files changed
&lt;span class="p"&gt;-&lt;/span&gt; recommended next step
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This template tells the agent how to work, not just what to do.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Codex Equivalent
&lt;/h2&gt;

&lt;p&gt;If you are using Codex, I would map the same pattern into three layers.&lt;/p&gt;

&lt;p&gt;First, use &lt;code&gt;AGENTS.md&lt;/code&gt; for repository-level instructions. OpenAI's Codex documentation describes &lt;code&gt;AGENTS.md&lt;/code&gt; as the place for project guidance, test commands, coding standards, and constraints.&lt;/p&gt;

&lt;p&gt;Minimal example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Repository Instructions&lt;/span&gt;

&lt;span class="gu"&gt;## Commands&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Install: pnpm install
&lt;span class="p"&gt;-&lt;/span&gt; Test: pnpm test
&lt;span class="p"&gt;-&lt;/span&gt; Lint: pnpm lint

&lt;span class="gu"&gt;## Rules&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; Prefer existing helpers under src/lib.
&lt;span class="p"&gt;-&lt;/span&gt; Do not add production dependencies without asking first.
&lt;span class="p"&gt;-&lt;/span&gt; Run pnpm test after changing TypeScript files.
&lt;span class="p"&gt;-&lt;/span&gt; Keep changes scoped to the user request.

&lt;span class="gu"&gt;## Verification&lt;/span&gt;

Before finishing, report:
&lt;span class="p"&gt;-&lt;/span&gt; Files changed
&lt;span class="p"&gt;-&lt;/span&gt; Commands run
&lt;span class="p"&gt;-&lt;/span&gt; Tests passed or why they could not run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Second, use Codex Automations for scheduled or recurring checks.&lt;/p&gt;

&lt;p&gt;Third, use Subagents and Workflows when research, verification, log analysis, or review should happen in separate contexts.&lt;/p&gt;

&lt;p&gt;The warning is the same as with Claude Code: parallel agents are not free. They consume more tokens and introduce coordination overhead. Use them when they reduce context pollution or improve verification quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Loop Engineering Actually Solves
&lt;/h2&gt;

&lt;h3&gt;
  
  
  It reduces human QA relay work
&lt;/h3&gt;

&lt;p&gt;You still review the final result. But you stop acting as the manual bridge between test output and the next agent instruction.&lt;/p&gt;

&lt;h3&gt;
  
  
  It makes long tasks recoverable
&lt;/h3&gt;

&lt;p&gt;A clear &lt;code&gt;LOOP-STATE.md&lt;/code&gt; lets an agent resume from the previous iteration instead of relying on a giant chat transcript.&lt;/p&gt;

&lt;h3&gt;
  
  
  It replaces confidence with evidence
&lt;/h3&gt;

&lt;p&gt;Agents are often confident. Evidence is better.&lt;/p&gt;

&lt;p&gt;Looped work should end with test logs, build output, diffs, screenshots, link checks, benchmark results, or explicit acceptance criteria.&lt;/p&gt;

&lt;h3&gt;
  
  
  It turns repeated work into team assets
&lt;/h3&gt;

&lt;p&gt;The first loop spec is slow to write. The second is faster. By the third time, it probably belongs in a reusable workflow, skill, automation, or project template.&lt;/p&gt;

&lt;p&gt;That is the difference between a prompt and an engineering practice.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three Practical Scenarios
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Research briefs without fake citations
&lt;/h3&gt;

&lt;p&gt;A common failure mode: ask an AI to write a research brief, and it returns polished claims with references that are dead links or do not support the claim.&lt;/p&gt;

&lt;p&gt;The loop version should require verification:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/goal research brief is complete:

Done when:
- every major claim has at least 2 accessible sources
- each source supports the specific claim it is attached to
- invalid sources are removed or replaced
- final Markdown includes a references section

Verification:
- open each link
- summarize what claim each source supports
- mark mismatched sources as invalid and replace them

Failure stop:
- no authoritative source found after 3 distinct search attempts
- required evidence is behind a paywall
- 6 iterations reached
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The loop is not about writing faster. It is about not publishing unsupported claims.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Fixing a frontend persistence bug
&lt;/h3&gt;

&lt;p&gt;Suppose a settings page says "saved," but after refresh the settings disappear.&lt;/p&gt;

&lt;p&gt;Good loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/goal settings persistence bug is fixed:

Done when:
- the save-refresh-loss bug is reproduced
- root cause is identified and fixed
- a regression test covers save and reload
- npm test settings passes
- if a dev server is available, manual refresh confirms persistence

Scope:
- inspect app/settings, lib/settings, tests/settings first
- do not modify auth, billing, or database migrations

Stop:
- stop if the API contract must change
- stop if a data migration is required
- stop if the same test fails 3 times without progress
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works well because the task has natural stages: reproduce, diagnose, fix, test, verify.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Building a 0-to-1 product
&lt;/h3&gt;

&lt;p&gt;Andrew Ng's framing of three product loops is useful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Agentic coding loop: the agent builds, tests, and fixes against a spec&lt;/li&gt;
&lt;li&gt;Developer feedback loop: the developer reviews product direction and updates the spec&lt;/li&gt;
&lt;li&gt;External feedback loop: real users, alpha testers, or A/B tests change the product vision&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These loops run at different speeds.&lt;/p&gt;

&lt;p&gt;The coding loop may run every few minutes. The developer feedback loop may run every few hours. External feedback may take days or weeks.&lt;/p&gt;

&lt;p&gt;Do not try to automate all three equally.&lt;/p&gt;

&lt;p&gt;My practical judgment: the first loop can be heavily automated. The second still needs human product context. The third must not be faked. User feedback cannot be replaced by a model's guess about what users might want.&lt;/p&gt;

&lt;p&gt;The point is not to remove the human entirely. It is to move the human out of repetitive low-level relay work and back into judgment, direction, and acceptance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Failure Modes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. The goal is a wish
&lt;/h3&gt;

&lt;p&gt;Bad:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/goal make the app better
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Better:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/goal homepage performance pass is complete:
- Lighthouse Performance &amp;gt;= 90
- LCP &amp;lt; 2.5s
- existing analytics remain intact
- npm run build passes
- before and after metrics are reported
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Agents need endpoints, not vibes.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The verifier is weak
&lt;/h3&gt;

&lt;p&gt;"Check if there are any issues" is not verification.&lt;/p&gt;

&lt;p&gt;Good verification:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;runs a specific command&lt;/li&gt;
&lt;li&gt;reads a specific output&lt;/li&gt;
&lt;li&gt;compares against a written condition&lt;/li&gt;
&lt;li&gt;reports pass or fail with evidence&lt;/li&gt;
&lt;li&gt;does not silently fix failures while pretending the check passed&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. There is no state file
&lt;/h3&gt;

&lt;p&gt;Without state, loops repeat themselves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;already-fixed tests get fixed again&lt;/li&gt;
&lt;li&gt;rejected hypotheses get rediscovered&lt;/li&gt;
&lt;li&gt;forbidden files get reopened&lt;/li&gt;
&lt;li&gt;previous failure reasons disappear&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep state short and structured:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# LOOP-STATE&lt;/span&gt;

&lt;span class="gu"&gt;## Current Status&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; status: doing
&lt;span class="p"&gt;-&lt;/span&gt; current_step: add regression test for password migration
&lt;span class="p"&gt;-&lt;/span&gt; last_verified: pnpm test auth failed on legacy hash path

&lt;span class="gu"&gt;## Done&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; confirmed current hash implementation
&lt;span class="p"&gt;-&lt;/span&gt; added migration helper draft

&lt;span class="gu"&gt;## Blocked&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; none

&lt;span class="gu"&gt;## Next&lt;/span&gt;
&lt;span class="p"&gt;
-&lt;/span&gt; fix legacy bcrypt verification test
&lt;span class="p"&gt;-&lt;/span&gt; rerun pnpm test auth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Permissions are too broad
&lt;/h3&gt;

&lt;p&gt;The more autonomous the loop, the narrower the permissions should be.&lt;/p&gt;

&lt;p&gt;Limit destructive commands, force pushes, database migrations, production deployment, customer data writes, outbound messages, purchases, and anything that cannot be safely undone.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Context keeps growing
&lt;/h3&gt;

&lt;p&gt;More context is not always better. In long-running loops, it often becomes rot.&lt;/p&gt;

&lt;p&gt;Prefer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;file paths as indexes&lt;/li&gt;
&lt;li&gt;reading files only when needed&lt;/li&gt;
&lt;li&gt;summarizing large logs&lt;/li&gt;
&lt;li&gt;writing state to disk&lt;/li&gt;
&lt;li&gt;compacting long sessions&lt;/li&gt;
&lt;li&gt;separating verification into a fresh context&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. /loop is used where /goal belongs
&lt;/h3&gt;

&lt;p&gt;If you know the endpoint, use a goal. If you only know the checking rhythm, use a loop.&lt;/p&gt;

&lt;p&gt;Bad:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/loop 10m keep refactoring until it is better
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Better:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/goal user-service split is complete:
- user-service.ts split into no more than 4 modules
- each module below 300 lines
- public API unchanged
- pnpm test user passes
- max 6 iterations
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  7. Human context is automated too early
&lt;/h3&gt;

&lt;p&gt;Product taste, business tradeoffs, customer insight, and brand judgment can be AI-assisted. They should not be silently delegated when the model lacks the context you have.&lt;/p&gt;

&lt;p&gt;Loop Engineering is strongest for execution and verification. Direction still needs context.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Rule of Thumb
&lt;/h2&gt;

&lt;p&gt;Before I put a task into a loop, I ask five questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Can the result be verified?&lt;/li&gt;
&lt;li&gt;Can the scope be narrowed?&lt;/li&gt;
&lt;li&gt;Can failures be recovered or escalated?&lt;/li&gt;
&lt;li&gt;Are human-approval actions explicit?&lt;/li&gt;
&lt;li&gt;Can progress be written to a state file?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If I cannot answer at least four of those clearly, I do not start a loop.&lt;/p&gt;

&lt;p&gt;"Design a better business model" is not ready for a loop. I would first use normal conversation to clarify constraints and options.&lt;/p&gt;

&lt;p&gt;"Classify 20 pieces of user feedback, output the top 5 issues, preserve the original quote for each, and assign a priority" is ready. It has inputs, outputs, evidence, and a completion condition.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Checklist
&lt;/h2&gt;

&lt;p&gt;Before writing a loop, check this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Goal:
- Is there a clear final state?
- Can it be verified by tests, builds, diffs, links, screenshots, metrics, or acceptance criteria?

Scope:
- What can be read?
- What can be edited?
- What is forbidden?
- Are new dependencies allowed?

Execution:
- Is each iteration small?
- Should existing project patterns be reused?
- Is state written after each iteration?

Verification:
- What command or check proves progress?
- What happens on verification failure?
- Is the verifier separated from the worker when needed?

Stop:
- What is the success stop?
- What is the failure stop?
- What is the max iteration or budget?

Permissions:
- Are destructive, production, and sensitive-data actions restricted?
- Are high-risk actions routed back to a human?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you cannot fill this out, do not start the loop yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Loop Engineering is not about making AI "run by itself."&lt;/p&gt;

&lt;p&gt;It is about making AI run inside boundaries.&lt;/p&gt;

&lt;p&gt;The real shift is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;from writing prompts to writing completion conditions&lt;/li&gt;
&lt;li&gt;from pasting errors to designing verification layers&lt;/li&gt;
&lt;li&gt;from trusting confidence to requiring evidence&lt;/li&gt;
&lt;li&gt;from accumulating chat history to externalizing state&lt;/li&gt;
&lt;li&gt;from one-off interactions to reusable workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;/goal&lt;/code&gt; is for tasks with endpoints. &lt;code&gt;/loop&lt;/code&gt; is for repeated checks. Harness provides the floor. Verifier provides evidence. Memory and state provide continuity. Stop rules provide the brakes.&lt;/p&gt;

&lt;p&gt;The stronger the model gets, the more discipline it needs.&lt;/p&gt;

&lt;p&gt;A weak model cannot get very far. A strong model can get very far in the wrong direction.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.claude.com/docs/en/commands" rel="noopener noreferrer"&gt;Claude Code Docs: Commands&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.claude.com/docs/en/goal" rel="noopener noreferrer"&gt;Claude Code Docs: Keep Claude working toward a goal&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.claude.com/docs/en/scheduled-tasks" rel="noopener noreferrer"&gt;Claude Code Docs: Run prompts on a schedule&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.openai.com/codex/guides/agents-md" rel="noopener noreferrer"&gt;Custom instructions with AGENTS.md&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents" rel="noopener noreferrer"&gt;Effective context engineering for AI agents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://modelcontextprotocol.io/docs/getting-started/intro" rel="noopener noreferrer"&gt;What is the Model Context Protocol&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://mufeng.blog/article/loop-engineering-goal-loop-agent-workflow" rel="noopener noreferrer"&gt;loop-engineering-goal-loop-agent-workflow&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>claudecode</category>
      <category>ai</category>
      <category>loopengineering</category>
      <category>agents</category>
    </item>
    <item>
      <title>The Real AI Productivity Hack Is Not a Better Prompt</title>
      <dc:creator>mufeng</dc:creator>
      <pubDate>Sat, 04 Jul 2026 00:47:04 +0000</pubDate>
      <link>https://dev.to/changyou/the-real-ai-productivity-hack-is-not-a-better-prompt-27dk</link>
      <guid>https://dev.to/changyou/the-real-ai-productivity-hack-is-not-a-better-prompt-27dk</guid>
      <description>&lt;p&gt;I used to think the next jump in AI productivity would come from writing better prompts.&lt;/p&gt;

&lt;p&gt;Longer prompts. More precise prompts. Prompts with role definitions, tone rules, examples, constraints, and output formats.&lt;/p&gt;

&lt;p&gt;After reading a book on Agent Skills, I think that framing is too small.&lt;/p&gt;

&lt;p&gt;The real bottleneck is not that I fail to explain a task once. The real bottleneck is that I keep explaining the same class of task again and again: how I want an article structured, how I review code, how I prepare App Store release notes, how I generate visuals, how I check a draft before publishing.&lt;/p&gt;

&lt;p&gt;At some point, “using AI” quietly turns into “managing AI manually.”&lt;/p&gt;

&lt;p&gt;The book’s most useful idea is simple:&lt;/p&gt;

&lt;p&gt;AI productivity does not come from making every prompt longer. It comes from turning repeated work into executable, maintainable, testable skills.&lt;/p&gt;

&lt;p&gt;That changed how I think about AI work.&lt;/p&gt;

&lt;p&gt;A Skill Is Not a Prompt&lt;br&gt;
A prompt is a temporary instruction inside one conversation.&lt;/p&gt;

&lt;p&gt;A skill is a reusable operating manual for an agent.&lt;/p&gt;

&lt;p&gt;That difference sounds small until you use AI every day. A prompt tells the model what you want right now. A skill tells the agent how a category of work should be done every time:&lt;/p&gt;

&lt;p&gt;when to activate&lt;br&gt;
what input to read&lt;br&gt;
what steps to follow&lt;br&gt;
which tools or scripts to call&lt;br&gt;
what output to produce&lt;br&gt;
what must never happen&lt;br&gt;
where the agent should stop and ask for human judgment&lt;br&gt;
That last part matters.&lt;/p&gt;

&lt;p&gt;The goal is not to remove the human from the work. The goal is to stop spending human attention on the same low-level instructions.&lt;/p&gt;

&lt;p&gt;For me, the most obvious candidates are not exotic:&lt;/p&gt;

&lt;p&gt;a writing style skill&lt;br&gt;
a code review skill&lt;br&gt;
an iOS release checklist skill&lt;br&gt;
an App Store release notes skill&lt;br&gt;
a book notes skill&lt;br&gt;
a weekly review skill&lt;br&gt;
These are not tasks I cannot do. They are tasks where I keep repeating the same standards, preferences, caveats, and checks.&lt;/p&gt;

&lt;p&gt;That repetition is the real cost.&lt;/p&gt;

&lt;p&gt;The Useful Split: Judgment, Mechanics, and Workflow&lt;br&gt;
One of the cleanest distinctions in the book is this:&lt;/p&gt;

&lt;p&gt;prompts handle semantic judgment&lt;br&gt;
scripts handle deterministic mechanics&lt;br&gt;
skills orchestrate the whole workflow&lt;br&gt;
This sounds obvious, but many AI workflows fail because they give the model the wrong job.&lt;/p&gt;

&lt;p&gt;For example, asking a model to decide where an article needs illustrations is reasonable. Asking it to reliably rename files, validate image dimensions, split long documents, or calculate table values is usually a mistake.&lt;/p&gt;

&lt;p&gt;Those are deterministic jobs. They should be handled by scripts or strict tools.&lt;/p&gt;

&lt;p&gt;The model is better used for judgment:&lt;/p&gt;

&lt;p&gt;choosing the angle of an essay&lt;br&gt;
identifying the weak part of a draft&lt;br&gt;
comparing two architecture options&lt;br&gt;
explaining a tradeoff&lt;br&gt;
turning rough material into clear language&lt;br&gt;
The skill sits above both. It says: when this kind of task appears, use the model for the judgment parts, use scripts for the mechanical parts, and preserve the checkpoints where a human decision is required.&lt;/p&gt;

&lt;p&gt;That is a much more durable pattern than trying to put everything into one giant prompt.&lt;/p&gt;

&lt;p&gt;Context Is a Workbench, Not a Warehouse&lt;br&gt;
Large context windows make it tempting to dump everything into the conversation.&lt;/p&gt;

&lt;p&gt;Style guides. Prior chats. Examples. Templates. API docs. Drafts. Personal preferences. All of it.&lt;/p&gt;

&lt;p&gt;The book argues for the opposite discipline: load the right material at the right time.&lt;/p&gt;

&lt;p&gt;That is how skills should be designed. The main SKILL.md should not become a warehouse. It should contain the core workflow:&lt;/p&gt;

&lt;p&gt;trigger conditions&lt;br&gt;
inputs and outputs&lt;br&gt;
main steps&lt;br&gt;
hard constraints&lt;br&gt;
failure modes&lt;br&gt;
references to load only when needed&lt;br&gt;
Long templates, examples, API notes, and style samples belong in separate reference files.&lt;/p&gt;

&lt;p&gt;This is not just about token savings. It is about attention. The more unrelated material you push into context, the easier it becomes for the model to miss the one rule that actually matters.&lt;/p&gt;

&lt;p&gt;Context should feel like a workbench: only the tools needed for the current job should be on it.&lt;/p&gt;

&lt;p&gt;Good Workflows Are Not Fully Automatic&lt;br&gt;
The dangerous version of AI automation is the one that looks efficient because it removes every pause.&lt;/p&gt;

&lt;p&gt;Become a Medium member&lt;br&gt;
Give the agent source material. Let it choose the angle. Let it write the draft. Let it polish the draft. Let it generate images. Let it publish.&lt;/p&gt;

&lt;p&gt;That looks like a productivity win. Often it is just a way to outsource the most important decisions.&lt;/p&gt;

&lt;p&gt;The better workflow is more selective.&lt;/p&gt;

&lt;p&gt;For writing, I want AI to:&lt;/p&gt;

&lt;p&gt;analyze source material&lt;br&gt;
propose several angles&lt;br&gt;
stop&lt;br&gt;
let me choose the angle&lt;br&gt;
draft from that angle&lt;br&gt;
revise against my standards&lt;br&gt;
prepare platform-specific versions&lt;br&gt;
The pause is not friction. It is the point.&lt;/p&gt;

&lt;p&gt;The same applies to development. AI can propose implementation plans, write tests, scan for regressions, and generate release notes. But architecture decisions, product tradeoffs, and publish decisions still need human ownership.&lt;/p&gt;

&lt;p&gt;AI can do the prep work. It should not silently take over the judgment.&lt;/p&gt;

&lt;p&gt;Skills Need Engineering, Not Decoration&lt;br&gt;
A useful skill should be treated more like a small software product than a clever note.&lt;/p&gt;

&lt;p&gt;That means it has a lifecycle:&lt;/p&gt;

&lt;p&gt;define the real problem&lt;br&gt;
build the smallest usable version&lt;br&gt;
run it on real tasks&lt;br&gt;
record failure modes&lt;br&gt;
add tests or examples&lt;br&gt;
refactor when the file becomes too large&lt;br&gt;
keep improving it as the work changes&lt;br&gt;
The most useful part of a skill is often not the elegant workflow. It is the “gotchas” section.&lt;/p&gt;

&lt;p&gt;That is where you record the failures that keep happening:&lt;/p&gt;

&lt;p&gt;the agent forgot to read the reference template&lt;br&gt;
the output sounded too generic&lt;br&gt;
the script handled the wrong file path&lt;br&gt;
the model rewrote sections it should have preserved&lt;br&gt;
the task needed a human checkpoint before publishing&lt;br&gt;
This is where personal experience becomes operational memory.&lt;/p&gt;

&lt;p&gt;If the same mistake happens twice, it probably belongs in the skill. If the same task happens three times, it is probably a candidate for a skill.&lt;/p&gt;

&lt;p&gt;The Security Boundary Is Part of the Design&lt;br&gt;
Skills become more serious when they can read files, write files, call scripts, access the network, or publish content.&lt;/p&gt;

&lt;p&gt;At that point, they are not just prompts. They are operational tools.&lt;/p&gt;

&lt;p&gt;So the safety rules need to be designed in from the beginning:&lt;/p&gt;

&lt;p&gt;limit where the skill can read and write&lt;br&gt;
avoid destructive actions without confirmation&lt;br&gt;
back up before overwriting important files&lt;br&gt;
test publishing workflows with fake data first&lt;br&gt;
remove local paths, secrets, and personal assumptions before sharing a skill publicly&lt;br&gt;
inspect third-party skills before running their scripts&lt;br&gt;
This is not paranoia. It is basic engineering hygiene.&lt;/p&gt;

&lt;p&gt;The more capable the agent becomes, the more explicit the boundaries must be.&lt;/p&gt;

&lt;p&gt;What I Am Going to Try First&lt;br&gt;
The book made the idea feel concrete enough that I can turn it into a weekly habit.&lt;/p&gt;

&lt;p&gt;This week, I would start with three small skills.&lt;/p&gt;

&lt;p&gt;First: a writing style skill.&lt;/p&gt;

&lt;p&gt;Not a giant manifesto. Just a role, three style principles, a short banned-phrase list, and a few examples of what “good” looks like.&lt;/p&gt;

&lt;p&gt;Second: an iOS or app release checklist skill.&lt;/p&gt;

&lt;p&gt;The first version only needs to cover version number, release notes, screenshots, privacy text, and a final manual confirmation before submission.&lt;/p&gt;

&lt;p&gt;Third: a gotchas section for existing skills.&lt;/p&gt;

&lt;p&gt;Take the last three AI outputs that were disappointing. Convert each failure into a specific rule. Do not patch for one example. Capture the pattern.&lt;/p&gt;

&lt;p&gt;There is also one experiment worth running immediately:&lt;/p&gt;

&lt;p&gt;Take a piece of material you want to turn into an article. Do not ask AI to write the article. Ask it to do only two things: analyze the material and propose three angles. Then stop and choose the angle yourself.&lt;/p&gt;

&lt;p&gt;If the final article improves, the human checkpoint paid for itself.&lt;/p&gt;

&lt;p&gt;The Shift&lt;br&gt;
The book did not make me want to use AI more.&lt;/p&gt;

&lt;p&gt;It made me want to manage AI less manually.&lt;/p&gt;

&lt;p&gt;That is the real shift: from temporary instruction to reusable workflow; from prompt accumulation to experience engineering; from asking AI to remember my preferences to writing those preferences into a system that can be maintained.&lt;/p&gt;

&lt;p&gt;Better prompts still matter.&lt;/p&gt;

&lt;p&gt;But the real compounding return comes when the prompt stops being a one-off instruction and becomes part of a skill.&lt;/p&gt;

&lt;p&gt;Disclosure: this essay was adapted from my Chinese reading notes and drafted with AI assistance.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>skills</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Two Ways Claude Code Calls Codex: One-Shot Subprocess vs. Persistent App Server</title>
      <dc:creator>mufeng</dc:creator>
      <pubDate>Fri, 19 Jun 2026 09:59:31 +0000</pubDate>
      <link>https://dev.to/changyou/two-ways-claude-code-calls-codex-one-shot-subprocess-vs-persistent-app-server-18a6</link>
      <guid>https://dev.to/changyou/two-ways-claude-code-calls-codex-one-shot-subprocess-vs-persistent-app-server-18a6</guid>
      <description>&lt;p&gt;"Claude Code calls Codex" sounds like one feature. It's at least two different process models, and they have almost nothing in common past the name.&lt;/p&gt;

&lt;p&gt;The first spawns a one-shot subprocess with &lt;code&gt;codex exec&lt;/code&gt;. You hand it one explicit instruction, it produces a file or a structured result, and it exits. The second runs a persistent runtime with &lt;code&gt;codex app-server&lt;/code&gt; and talks to it over JSON-RPC, managing threads, turns, reviews, and interrupts for work that needs to carry state across rounds.&lt;/p&gt;

&lt;p&gt;Both let Claude Code borrow Codex. They differ on startup cost, protocol, permissions, error recovery, and the kind of task they fit. Get the distinction wrong and you either over-engineer a one-shot job or reach for a stateless call on work that needs to resume.&lt;/p&gt;

&lt;h2&gt;
  
  
  The conclusion first: two architectures, not two commands
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;
&lt;code&gt;codex exec&lt;/code&gt; one-shot subprocess&lt;/th&gt;
&lt;th&gt;
&lt;code&gt;codex app-server&lt;/code&gt; persistent service&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Reference implementation&lt;/td&gt;
&lt;td&gt;baoyu &lt;code&gt;codex-imagegen&lt;/code&gt; backend&lt;/td&gt;
&lt;td&gt;OpenAI Codex Plugin for Claude Code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Process shape&lt;/td&gt;
&lt;td&gt;Spawned per task, exits when done&lt;/td&gt;
&lt;td&gt;Long-running, reused within a session&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Transport&lt;/td&gt;
&lt;td&gt;Launch args, stdin, JSONL event stream&lt;/td&gt;
&lt;td&gt;JSON-RPC requests and notifications&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;State model&lt;/td&gt;
&lt;td&gt;Single run, no dependence on the last&lt;/td&gt;
&lt;td&gt;Thread holds multiple turns, can resume&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Permission posture&lt;/td&gt;
&lt;td&gt;The example uses &lt;code&gt;danger-full-access&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Review is read-only; task can switch to &lt;code&gt;workspace-write&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typical task&lt;/td&gt;
&lt;td&gt;Image gen, file generation, single deterministic op&lt;/td&gt;
&lt;td&gt;Code review, long delegated tasks, multi-turn work&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Main risk&lt;/td&gt;
&lt;td&gt;Full-access child, cold start every time&lt;/td&gt;
&lt;td&gt;More protocol and lifecycle complexity&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The one-line test:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you need to run once and get a single verifiable artifact, reach for &lt;code&gt;codex exec&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If you need ongoing collaboration, retained context, and the ability to cancel or resume, reach for &lt;code&gt;codex app-server&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Version scope: keep the numbers honest
&lt;/h2&gt;

&lt;p&gt;The first thing this writeup exposed wasn't architecture. It was version accounting. I had carried over the original draft's phrasing about "the current local version," and only after checking the install records did I confirm that the marketplace source and the active plugin were not the same snapshot.&lt;/p&gt;

&lt;p&gt;Local commands and plugin records show:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Codex CLI is &lt;code&gt;0.140.0&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The OpenAI Codex Plugin for Claude Code is &lt;code&gt;1.0.4&lt;/code&gt;, commit &lt;code&gt;807e03a&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The baoyu-skills marketplace source snapshot is &lt;code&gt;2.5.1&lt;/code&gt;, commit &lt;code&gt;441ca30&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;But Claude Code's installed-plugin record still points baoyu-skills at the earlier &lt;code&gt;1.111.1&lt;/code&gt; snapshot.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the accurate way to state the &lt;code&gt;baoyu-codex-imagegen&lt;/code&gt; analysis below is this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It's based on the baoyu-skills v2.5.1 source snapshot in the local marketplace, not a claim that the active plugin has been upgraded to v2.5.1.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is easy to miss. The marketplace source, the cached snapshot, and the active version can all be different commits. Read the directory name or the changelog alone and you'll write "the version I read" when you mean "the version actually running."&lt;/p&gt;

&lt;h2&gt;
  
  
  Path one: &lt;code&gt;codex exec&lt;/code&gt;, Codex as a one-shot operator
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What it solves
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;baoyu-codex-imagegen&lt;/code&gt; skill has a narrow job: let a non-Codex host like Claude Code call the &lt;code&gt;image_gen&lt;/code&gt; tool built into the Codex CLI, and save the result to a chosen path.&lt;/p&gt;

&lt;p&gt;Tasks like that share a shape:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clear input boundary, usually a prompt, an aspect ratio, and an output path.&lt;/li&gt;
&lt;li&gt;Clear result boundary, usually one file and one line of structured status.&lt;/li&gt;
&lt;li&gt;No need for multiple rounds, and no need to restore prior context.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So it skips a persistent service and spawns directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;codex &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--json&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--sandbox&lt;/span&gt; danger-full-access &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--skip-git-repo-check&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  -
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a reference image exists, it appends one or more &lt;code&gt;--image&lt;/code&gt; arguments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why each flag is there
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;exec&lt;/code&gt; runs non-interactively for scripting. OpenAI's CLI docs position it as the execution path for automation and CI: run, return a result, done.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;--json&lt;/code&gt; turns process output into line-delimited JSON events, or JSONL. The caller doesn't parse terminal display text; it reads structured events for the thread, tool calls, usage, and the final message.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;--sandbox danger-full-access&lt;/code&gt; is here because this implementation needs Codex to copy the image from its default generation directory to an arbitrary target path the caller specifies, so it grants full file permissions.&lt;/p&gt;

&lt;p&gt;That is not a general best practice. OpenAI's docs recommend &lt;code&gt;workspace-write&lt;/code&gt; for automation and say to avoid unnecessary full access unless the runtime is already isolated.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;--skip-git-repo-check&lt;/code&gt; lets Codex run outside a Git repo, since image jobs may launch from a temp or plugin directory rather than a trusted repository.&lt;/p&gt;

&lt;p&gt;The trailing &lt;code&gt;-&lt;/code&gt; tells Codex to read the instruction from stdin. The wrapper writes the task contract with &lt;code&gt;child.stdin.write(instruction)&lt;/code&gt; and then closes stdin.&lt;/p&gt;

&lt;h3&gt;
  
  
  The task contract is the real work
&lt;/h3&gt;

&lt;p&gt;This path doesn't pass the user prompt straight through. It wraps a strict instruction, roughly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TASK:
Generate an image and save it to the given path.

STEPS:
1. You must call the built-in image_gen.
2. Copy the result to the target path.
3. Check that the target file exists.
4. Return one line of JSON only.

HARD CONSTRAINTS:
- Do not call an external image API.
- Do not fake the image with a script.
- You must use image_gen to produce real pixels.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the "sub-agent as operator" design:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fixed input structure.&lt;/li&gt;
&lt;li&gt;Fixed set of allowed tools.&lt;/li&gt;
&lt;li&gt;Fixed file side effects.&lt;/li&gt;
&lt;li&gt;Fixed output format.&lt;/li&gt;
&lt;li&gt;Explicit prohibitions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For an automated pipeline, the constraints matter more than the phrasing. The caller wants a verifiable result, not an open conversation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Don't trust self-reported success: three checks
&lt;/h3&gt;

&lt;p&gt;The engineering detail worth keeping is that this implementation does not call the job done just because Codex replied "success."&lt;/p&gt;

&lt;p&gt;It checks, in order:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Whether the JSONL events contain a thread ID.&lt;/li&gt;
&lt;li&gt;Whether an image actually appears under &lt;code&gt;$CODEX_HOME/generated_images/{threadId}/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If the directory check fails, whether the tool calls include a &lt;code&gt;cp&lt;/code&gt; or &lt;code&gt;mv&lt;/code&gt; from the generation directory to the target path.&lt;/li&gt;
&lt;li&gt;Whether the target file actually exists and has a byte count above zero.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Failure becomes a structured error:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;agent_refused&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;no_image_gen_tool_use&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;timeout&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;codex_not_installed&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;spawn_failed&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point isn't the image. It's a general principle:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An agent's natural-language reply is a claim. Files, events, and repeatable checks are evidence.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Where it fits and where it doesn't
&lt;/h3&gt;

&lt;p&gt;Good fit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Single image or file generation.&lt;/li&gt;
&lt;li&gt;A code transform with clear boundaries.&lt;/li&gt;
&lt;li&gt;One-off analysis that returns structured JSON.&lt;/li&gt;
&lt;li&gt;Automation that doesn't need inherited context.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Limits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every run pays process and model cold-start cost.&lt;/li&gt;
&lt;li&gt;No cross-run state by default.&lt;/li&gt;
&lt;li&gt;With &lt;code&gt;danger-full-access&lt;/code&gt;, the trust boundary is very wide.&lt;/li&gt;
&lt;li&gt;Timeout, cancellation, and recovery usually fall to the wrapper to build.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Path two: &lt;code&gt;codex app-server&lt;/code&gt;, Codex as a stateful service
&lt;/h2&gt;

&lt;p&gt;The OpenAI Codex Plugin for Claude Code does not re-run &lt;code&gt;codex exec&lt;/code&gt; per command. It starts &lt;code&gt;codex app-server&lt;/code&gt; and manages an ongoing session over JSON-RPC.&lt;/p&gt;

&lt;p&gt;OpenAI's docs define the App Server's core abstraction in three layers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Thread: a conversation that persists.&lt;/li&gt;
&lt;li&gt;Turn: one round of user input and agent execution inside a thread.&lt;/li&gt;
&lt;li&gt;Item: events inside a turn, such as messages, reasoning, commands, and file edits.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Direct connection and broker
&lt;/h3&gt;

&lt;p&gt;The plugin supports two connection modes.&lt;/p&gt;

&lt;p&gt;Direct:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Claude Code
    |
    | stdin/stdout JSONL
    v
codex app-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The client starts &lt;code&gt;codex app-server&lt;/code&gt; itself and sends line-delimited JSON-RPC over stdio.&lt;/p&gt;

&lt;p&gt;Broker:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Claude Code command
    |
    | Unix socket
    v
Broker
    |
    | reuse
    v
codex app-server
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The plugin stores the broker endpoint in &lt;code&gt;CODEX_COMPANION_APP_SERVER_ENDPOINT&lt;/code&gt; so review, rescue, and status commands in the same Claude Code session share one Codex runtime.&lt;/p&gt;

&lt;p&gt;If the broker returns the busy error &lt;code&gt;-32001&lt;/code&gt;, or the connection hits &lt;code&gt;ENOENT&lt;/code&gt; or &lt;code&gt;ECONNREFUSED&lt;/code&gt;, the plugin drops the broker and starts an App Server directly to retry.&lt;/p&gt;

&lt;p&gt;That's one more layer than a one-shot subprocess, and it buys:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runtime reuse within a session.&lt;/li&gt;
&lt;li&gt;Thread persistence.&lt;/li&gt;
&lt;li&gt;Background task management.&lt;/li&gt;
&lt;li&gt;Cancel and resume.&lt;/li&gt;
&lt;li&gt;Permission isolation between review and task.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Handshake: initialize first
&lt;/h3&gt;

&lt;p&gt;Once the App Server connection is up, the client sends &lt;code&gt;initialize&lt;/code&gt;, then an &lt;code&gt;initialized&lt;/code&gt; notification.&lt;/p&gt;

&lt;p&gt;The plugin passes this client identity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Codex Plugin"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Claude Code"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"1.0.4"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It also uses &lt;code&gt;optOutNotificationMethods&lt;/code&gt; to unsubscribe from some token-level delta events, keeping the structured notifications that are worth more to the caller and cutting noise.&lt;/p&gt;

&lt;h3&gt;
  
  
  Session model: threads and turns
&lt;/h3&gt;

&lt;p&gt;The key RPC methods the plugin uses:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;thread/start&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Create a new thread&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;thread/name/set&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Name a thread&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;thread/resume&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Resume an existing thread&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;thread/list&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Query past threads&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;turn/start&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Start a turn in a thread&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;review/start&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Start a code review&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;turn/interrupt&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Interrupt a running turn&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So the App Server isn't a single-round wrapper that "sends a prompt and waits." It's a managed session runtime.&lt;/p&gt;

&lt;h3&gt;
  
  
  Review and task have different permissions
&lt;/h3&gt;

&lt;p&gt;The plugin keeps the two actions separate.&lt;/p&gt;

&lt;p&gt;Review runs read-only, on a temporary thread, through &lt;code&gt;review/start&lt;/code&gt;. It returns findings and does not touch code.&lt;/p&gt;

&lt;p&gt;Task defaults to read-only. Pass &lt;code&gt;--write&lt;/code&gt; and it switches to &lt;code&gt;workspace-write&lt;/code&gt;. It can save the thread, and it can continue prior work with &lt;code&gt;--resume&lt;/code&gt; or &lt;code&gt;--resume-last&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is closer to what an engineering system's default should look like than "run everything with full access." Set the minimum permission by the nature of the task, then decide whether to widen write scope.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hooks wire Codex into the Claude Code lifecycle
&lt;/h3&gt;

&lt;p&gt;The plugin registers three Claude Code hooks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;SessionStart&lt;/code&gt;: prepare the shared runtime.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SessionEnd&lt;/code&gt;: clean up the broker and session resources.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Stop&lt;/code&gt;: an optional stop-gate review.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With the review gate on, every time Claude Code is about to stop, it can have Codex check whether the last round has a blocking problem.&lt;/p&gt;

&lt;p&gt;The value isn't "one more model." It's putting a second model inside the delivery flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Claude makes a change
    |
    v
Codex reviews independently
    |
    +-- ALLOW: stop is permitted
    |
    +-- BLOCK: return findings, keep working
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It has a cost. The official plugin README warns that the review gate can create long Claude/Codex loops and burn through usage fast, so don't turn it on unconditionally.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to choose
&lt;/h2&gt;

&lt;h3&gt;
  
  
  When &lt;code&gt;codex exec&lt;/code&gt; fits
&lt;/h3&gt;

&lt;p&gt;Use a one-shot subprocess when most of these hold:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The task is a single round.&lt;/li&gt;
&lt;li&gt;The result can be verified by a file or JSON.&lt;/li&gt;
&lt;li&gt;You don't need to restore prior context.&lt;/li&gt;
&lt;li&gt;Cold-start cost is acceptable.&lt;/li&gt;
&lt;li&gt;The caller can handle timeout and retry on its own.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Examples: generate an image, convert input to a fixed format, run one analysis on a file, run a check once in CI.&lt;/p&gt;

&lt;h3&gt;
  
  
  When &lt;code&gt;codex app-server&lt;/code&gt; fits
&lt;/h3&gt;

&lt;p&gt;Use the persistent service when you need:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Multiple rounds of conversation.&lt;/li&gt;
&lt;li&gt;Thread resumption.&lt;/li&gt;
&lt;li&gt;Background runs and status queries.&lt;/li&gt;
&lt;li&gt;Interruption of a running task.&lt;/li&gt;
&lt;li&gt;Separate review and write permissions.&lt;/li&gt;
&lt;li&gt;Integration with Claude Code's session lifecycle.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Examples: review a branch continuously, delegate a long investigation, let Codex change code and then add tests, or run an automatic second-model gate before stopping.&lt;/p&gt;

&lt;h2&gt;
  
  
  How this was verified
&lt;/h2&gt;

&lt;p&gt;This published version doesn't lean on the draft's description. I redid a minimal verification.&lt;/p&gt;

&lt;p&gt;The steps I ran:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read the draft and listed every factual claim about versions, commands, RPC methods, and permissions.&lt;/li&gt;
&lt;li&gt;Ran &lt;code&gt;codex --version&lt;/code&gt;, &lt;code&gt;codex exec --help&lt;/code&gt;, and &lt;code&gt;codex app-server --help&lt;/code&gt; to confirm the current CLI's commands and flags.&lt;/li&gt;
&lt;li&gt;Checked the OpenAI plugin manifest, install records, &lt;code&gt;app-server.mjs&lt;/code&gt;, &lt;code&gt;codex.mjs&lt;/code&gt;, and the hook config.&lt;/li&gt;
&lt;li&gt;Checked &lt;code&gt;spawn.ts&lt;/code&gt;, &lt;code&gt;main.ts&lt;/code&gt;, the version file, and the Git commit in the baoyu marketplace source.&lt;/li&gt;
&lt;li&gt;Cross-checked against the OpenAI Codex CLI, App Server, Codex Plugin, and Claude Code Hooks docs.&lt;/li&gt;
&lt;li&gt;Recorded "current active version" and "source snapshot I actually read" separately.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The mistake and the lesson
&lt;/h3&gt;

&lt;p&gt;I first took the draft's baoyu-skills v2.5.1 as "the current local version." On further checking, the v2.5.1 marketplace source does exist locally, but Claude Code's installed-plugin record still points at an earlier snapshot.&lt;/p&gt;

&lt;p&gt;Without checking the install record, that phrasing looks reasonable and is wrong.&lt;/p&gt;

&lt;p&gt;The lesson:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When you analyze a local plugin, record at least the marketplace HEAD, the install cache path, the plugin manifest, and the commit. No single one of those stands in for "the version actually running."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Practical advice
&lt;/h2&gt;

&lt;h3&gt;
  
  
  One-shot tasks: hardcode the output contract
&lt;/h3&gt;

&lt;p&gt;Don't write "generate an image for me" or "check my code." An automation prompt should include at least:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Goal
Allowed tools
Input and output paths
Prohibitions
Verification steps
Final return format
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That cuts the uncertainty of an agent improvising, and it lets the caller judge success or failure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Long tasks: resume with the delta only
&lt;/h3&gt;

&lt;p&gt;When you resume a thread, send only what changed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Continue the last task. Apply the first fix and add the matching test.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There's no reason to re-paste the whole background. Repeating context adds noise and can make the model misread the task boundary.&lt;/p&gt;

&lt;h3&gt;
  
  
  Review tasks: bind every finding to evidence
&lt;/h3&gt;

&lt;p&gt;Whether you run a standard review or an adversarial one, require each finding to carry:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The file or diff actually examined.&lt;/li&gt;
&lt;li&gt;A reproducible failure path.&lt;/li&gt;
&lt;li&gt;A clear risk level.&lt;/li&gt;
&lt;li&gt;A split between fact, inference, and open question.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A "might be a problem" with no evidence rarely makes it into an engineering decision.&lt;/p&gt;

&lt;h3&gt;
  
  
  Permissions: start at the smallest scope
&lt;/h3&gt;

&lt;p&gt;The order of preference:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;read-only
    |
    v
workspace-write
    |
    v
danger-full-access
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Widen only when the task genuinely needs a larger file scope and the runtime is trusted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;"Claude Code calls Codex" is not one calling convention.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;codex exec&lt;/code&gt; is a one-shot, stateless subprocess that's easy to wrap. It fits single tasks with clear boundaries and verifiable results.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;codex app-server&lt;/code&gt; is a stateful, resumable, manageable agent service. It fits code review, task delegation, and complex work that needs ongoing collaboration.&lt;/p&gt;

&lt;p&gt;The real selection criteria aren't "which is more advanced." They are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does the task need state?&lt;/li&gt;
&lt;li&gt;Can the result be verified in one shot?&lt;/li&gt;
&lt;li&gt;Do you need interruption, resume, and background management?&lt;/li&gt;
&lt;li&gt;Can permissions be graded by action?&lt;/li&gt;
&lt;li&gt;Is the extra protocol complexity worth it?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Simple tasks get a simple process. Ongoing collaboration gets a stateful service. Draw that line clearly and the system gets easier to understand and to maintain.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developers.openai.com/codex/cli/reference" rel="noopener noreferrer"&gt;OpenAI Codex CLI Command Line Options&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.openai.com/codex/app-server" rel="noopener noreferrer"&gt;OpenAI Codex App Server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/openai/codex-plugin-cc/tree/807e03ac9d5aa23bc395fdec8c3767500a86b3cf" rel="noopener noreferrer"&gt;OpenAI Codex Plugin for Claude Code v1.0.4&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.claude.com/docs/en/hooks" rel="noopener noreferrer"&gt;Claude Code Hooks Reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://raw.githubusercontent.com/JimLiu/baoyu-skills/main/packages/baoyu-codex-imagegen/src/spawn.ts" rel="noopener noreferrer"&gt;baoyu-codex-imagegen spawn.ts&lt;/a&gt; and &lt;a href="https://raw.githubusercontent.com/JimLiu/baoyu-skills/main/packages/baoyu-codex-imagegen/src/main.ts" rel="noopener noreferrer"&gt;main.ts&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>codex</category>
      <category>claudecode</category>
    </item>
    <item>
      <title>Your blog is invisible to AI. Here's the 1999 fix.</title>
      <dc:creator>mufeng</dc:creator>
      <pubDate>Mon, 15 Jun 2026 03:49:58 +0000</pubDate>
      <link>https://dev.to/changyou/your-blog-is-invisible-to-ai-heres-the-1999-fix-4d8i</link>
      <guid>https://dev.to/changyou/your-blog-is-invisible-to-ai-heres-the-1999-fix-4d8i</guid>
      <description>&lt;p&gt;&lt;em&gt;A quick story about a dead protocol, a confused chatbot, and the ten minutes that gave my blog a new kind of reader.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Hey friends,&lt;/p&gt;

&lt;p&gt;A small thing happened the other day that I haven't been able to stop thinking about.&lt;/p&gt;

&lt;p&gt;I dropped a link to my blog into Claude and asked it to read a few of my recent posts. It came back and told me: can't fetch it. The page returned an empty shell — &lt;code&gt;undefined | loading&lt;/code&gt;. My blog runs on NotionNext, the content renders client-side with JavaScript, and AI crawlers don't execute JS. All it got was the skeleton that exists &lt;em&gt;before&lt;/em&gt; the page comes to life.&lt;/p&gt;

&lt;p&gt;I stared at that spinner for a few seconds, and something clicked: &lt;strong&gt;in the AI era, a site built only for human eyes is worth only half of what it could be.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The other half belongs to machine readers. And the door to those readers was already built back in 1999. It's called RSS.&lt;/p&gt;

&lt;p&gt;If you've been around the internet long enough, you just felt a little nostalgia twinge. Stay with me — this turned out to be one of the highest-leverage things I've done for my writing in years.&lt;/p&gt;

&lt;h2&gt;
  
  
  What RSS actually is
&lt;/h2&gt;

&lt;p&gt;One sentence: RSS is a &lt;strong&gt;read-only API&lt;/strong&gt; your blog exposes to the world.&lt;/p&gt;

&lt;p&gt;It's a static XML file listing your most recent posts in reverse-chronological order — title, link, publish date, and either a summary or the full text. Any program can grab it with a single HTTP request. No JavaScript, no login, no API key.&lt;/p&gt;

&lt;p&gt;If you're technical, picture a public &lt;code&gt;GET /articles?limit=20&lt;/code&gt; endpoint whose response format hasn't changed in over two decades. A protocol defined in 1999, and every reader today still parses every feed. In web terms, that's a living fossil.&lt;/p&gt;

&lt;p&gt;It solves exactly one problem: &lt;strong&gt;readers no longer have to keep reopening your site to check for updates.&lt;/strong&gt; Someone adds your feed to their reader, the reader polls it on a schedule, new posts get pushed to them. The subscription lives entirely in &lt;em&gt;their&lt;/em&gt; hands — no algorithm, no rate limit, no platform taking a cut.&lt;/p&gt;

&lt;p&gt;(Sound familiar? It's basically what you're doing by reading this email. A newsletter is RSS with a friendlier face.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Why we forgot about it
&lt;/h2&gt;

&lt;p&gt;The platforms won.&lt;/p&gt;

&lt;p&gt;When Google Reader shut down in 2013, control over information flow shifted from &lt;em&gt;subscription&lt;/em&gt; to &lt;em&gt;recommendation&lt;/em&gt;. Twitter/X, TikTok, Instagram — algorithms decide what you see and feed your attention on a drip. Subscription is too "dumb" for that business model: it won't guess what you like, won't manufacture anxiety, won't keep you scrolling.&lt;/p&gt;

&lt;p&gt;So RSS retreated to the corner, kept alive by a small group: programmers, content creators, deep readers.&lt;/p&gt;

&lt;p&gt;But here's the twist — &lt;strong&gt;that small group is exactly the audience an independent writer most wants.&lt;/strong&gt; People still using an RSS reader actively curate their own sources. They don't scroll a feed; they choose their springs. Get into their list and you've earned a long-term seat at the table: they read &lt;em&gt;everything&lt;/em&gt; you publish, not the one piece an algorithm happened to surface.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why AI is bringing it back
&lt;/h2&gt;

&lt;p&gt;Two shifts changed my mind.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One: machines are your blog's new readers.&lt;/strong&gt; People now ask ChatGPT and Claude to summarize your work, point assistants at your site to track updates, and let agents pull your content into research. Most of those crawlers don't run JavaScript — so a client-rendered blog is a blank page to them. RSS is pure server-side XML; any AI can parse it in one line. When I sent Claude my &lt;em&gt;RSS&lt;/em&gt; link instead, it instantly read every recent post. Same content — the HTML page is a welded-shut door, the feed is an open window.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Two: AI fixes RSS's old fatal flaw.&lt;/strong&gt; Subscription used to die under its own weight — a hundred feeds, hundreds of daily updates, no human can keep up. An LLM dissolves that. More people now let AI sweep every source once a day and produce a linked digest, surfacing only the few pieces worth reading closely. &lt;em&gt;You&lt;/em&gt; pick the sources, AI does the skimming, you keep the deep reading.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In the algorithm era, a platform uses AI to feed you. In the RSS + LLM era, you use AI to feed yourself.&lt;/strong&gt; The controls have flipped.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do it in ten minutes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Confirm you have a feed.&lt;/strong&gt; Most frameworks ship one for free. Try &lt;code&gt;yourdomain.com/rss/feed.xml&lt;/code&gt; or &lt;code&gt;/atom.xml&lt;/code&gt; (NotionNext / Hexo / Hugo), &lt;code&gt;yourdomain.com/feed&lt;/code&gt; (WordPress), or &lt;code&gt;yourdomain.com/rss&lt;/code&gt; (Ghost). See XML? It works.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make it visible.&lt;/strong&gt; Put an RSS link (with the orange icon) in your footer or About page, and confirm your HTML &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; has the auto-discovery line:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;   &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"alternate"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"application/rss+xml"&lt;/span&gt; &lt;span class="na"&gt;title=&lt;/span&gt;&lt;span class="s"&gt;"RSS"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"https://yourdomain.com/rss/feed.xml"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Use it yourself.&lt;/strong&gt; Install &lt;a href="https://feedly.com" rel="noopener noreferrer"&gt;Feedly&lt;/a&gt;, &lt;a href="https://reederapp.com" rel="noopener noreferrer"&gt;Reeder&lt;/a&gt;, or &lt;a href="https://folo.is" rel="noopener noreferrer"&gt;Folo&lt;/a&gt;. Subscribe to five writers you admire plus your own blog. Live with it a week and feel the difference between &lt;em&gt;information finding you&lt;/em&gt; and &lt;em&gt;you chasing it&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Want to go further? Use n8n or GitHub Actions to pull your feeds on a schedule, send the updates to an LLM API for a daily digest, and push it to your inbox or Telegram. An evening's work — probably the highest-ROI personal infrastructure you'll ever build.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It won't reach a mass audience.&lt;/strong&gt; Most people don't know what RSS is. Bulk traffic still comes from social and search. RSS serves the small high-value slice — and the machines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Almost no engagement data.&lt;/strong&gt; No open rates, no idea who's reading. For dashboard people, it feels like writing in the dark.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full text vs. summary is a real tradeoff.&lt;/strong&gt; Full text is kind to readers but invites scrapers; summaries drive clicks but degrade the experience. My take: ship full text. An independent writer's enemy was never being reposted — it's not being read at all.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  One last thing
&lt;/h2&gt;

&lt;p&gt;After years of building software, I keep coming back to one conviction: &lt;strong&gt;the good protocols outlive the platforms.&lt;/strong&gt; Email is older than every social app and won't die. HTTP has watched products rise, throw their banquet, and collapse. RSS has been pronounced dead more times than anyone can count — and in the AI era, it found its second spring.&lt;/p&gt;

&lt;p&gt;Platforms change. Algorithms change. Whichever channel is hot this quarter will change. But the need for &lt;em&gt;an open, machine-readable outlet anyone can subscribe to&lt;/em&gt; does not.&lt;/p&gt;

&lt;p&gt;Spend ten minutes today: find your feed, surface it, subscribe to it. Then hand the link to your AI assistant and watch it read back every post you've ever written.&lt;/p&gt;

&lt;p&gt;That's the moment you realize your blog just gained a whole new audience that's always online.&lt;/p&gt;

&lt;p&gt;Until next time,&lt;br&gt;
Joey&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If a friend would find this useful, forward it along. And if someone shared this with you — you can subscribe below to get the next one straight to your inbox.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rss</category>
    </item>
    <item>
      <title>Your AI Agent Is Underperforming Because of Your Harness, Not the Model</title>
      <dc:creator>mufeng</dc:creator>
      <pubDate>Thu, 11 Jun 2026 05:08:36 +0000</pubDate>
      <link>https://dev.to/changyou/your-ai-agent-is-underperforming-because-of-your-harness-not-the-model-1cf7</link>
      <guid>https://dev.to/changyou/your-ai-agent-is-underperforming-because-of-your-harness-not-the-model-1cf7</guid>
      <description>&lt;p&gt;The pattern is familiar: your AI agent produces garbage output, so you switch to a better model. Things improve for a few days, then the same problems resurface. You upgrade again.&lt;/p&gt;

&lt;p&gt;Here's what you're probably missing: &lt;strong&gt;the model is just one input. The rest is harness — and that's almost always where the real problem lives.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is a Harness?
&lt;/h2&gt;

&lt;p&gt;The cleanest definition comes from engineer Vtrivedy, who coined the term:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Agent = Model + Harness. If you're not the model, you're the harness.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A harness encompasses everything except the model itself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;System prompts, CLAUDE.md / AGENTS.md files, Skill definitions&lt;/li&gt;
&lt;li&gt;Tool descriptions, MCP servers, and their technical specifications&lt;/li&gt;
&lt;li&gt;Execution environment: filesystem, sandboxes, headless browsers&lt;/li&gt;
&lt;li&gt;Subagent orchestration: spawning logic, task handoffs, routing&lt;/li&gt;
&lt;li&gt;Hooks: deterministic enforcement layers (linting, formatting, permission checks)&lt;/li&gt;
&lt;li&gt;Observability: cost monitoring, latency tracking, logs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This entire surface area is yours to design, not the model provider's.&lt;/p&gt;

&lt;p&gt;Claude Code, Cursor, Codex, Cline — these tools might run on identical underlying models, but the behavior you experience is dominated by the harness each one provides. The underlying model might be identical across two setups; the behavior you see will be completely different.&lt;/p&gt;

&lt;p&gt;This leads to a counterintuitive but well-supported finding:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A decent model with a great harness consistently outperforms a great model with a bad harness.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Engineers Default to Model-Blaming
&lt;/h2&gt;

&lt;p&gt;When an agent does something nonsensical, blaming the model is the path of least resistance. It's the most visible component, and failures often &lt;em&gt;look&lt;/em&gt; like reasoning problems.&lt;/p&gt;

&lt;p&gt;But most failures are legible if you look closely:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Agent ignored a coding convention → Add it to AGENTS.md&lt;/li&gt;
&lt;li&gt;Agent ran a destructive command → Write a Hook to block it&lt;/li&gt;
&lt;li&gt;Agent got lost in a 40-step task → Split into Planner and Executor subagents&lt;/li&gt;
&lt;li&gt;Agent consistently ships broken types → Wire a type-checker signal into the loop&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As HumanLayer frames it: &lt;em&gt;"It's not a model problem. It's a configuration problem."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Consider the performance benchmarks: a leading model running inside an off-the-shelf framework often scores dramatically lower than the exact same model running in a custom, highly-tuned harness. The model's capabilities didn't change — the harness is what unlocks them.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Ratchet: Every Failure Becomes a Rule
&lt;/h2&gt;

&lt;p&gt;The most important habit in harness engineering is treating agent failures as permanent signals, not one-off flukes to retry and forget.&lt;/p&gt;

&lt;p&gt;Think of a mechanical ratchet: it only moves forward, never backward.&lt;/p&gt;

&lt;p&gt;When an agent makes a mistake, you don't retry and hope for better luck. You engineer a permanent fix so the same exact failure cannot happen again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt; An agent submits a PR with commented-out tests. It gets merged into main.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Wrong response:&lt;/em&gt; Fix it manually. Move on.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Harness response:&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add to AGENTS.md: "Never comment out tests. Delete or fix them."&lt;/li&gt;
&lt;li&gt;Add a pre-commit Hook that flags &lt;code&gt;.skip(&lt;/code&gt; in any diff automatically.&lt;/li&gt;
&lt;li&gt;Update the Reviewer subagent's instructions: commented-out tests are a blocking issue.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Three layers. Same failure is structurally impossible now.&lt;/p&gt;

&lt;p&gt;Constraints should be added when you observe a real failure, and removed when a more capable model makes them redundant. &lt;strong&gt;Every line in a good system prompt should trace back to a specific, historical failure.&lt;/strong&gt; A harness that grows without bound is just as broken as one that never grows.&lt;/p&gt;




&lt;h2&gt;
  
  
  CLAUDE.md Is a Failure Log, Not Documentation
&lt;/h2&gt;

&lt;p&gt;This is the mistake I see most often. Engineers treat CLAUDE.md like a README written for an AI: project overview, tech stack, coding conventions. Useful — but incomplete.&lt;/p&gt;

&lt;p&gt;Mature harnesses treat CLAUDE.md differently: &lt;strong&gt;every rule should trace back to a specific, real incident.&lt;/strong&gt; If you can't remember the failure that generated a rule, it's probably noise that dilutes the signal of the rules that actually matter.&lt;/p&gt;

&lt;p&gt;Examples of rules with provenance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;"Never use &lt;code&gt;any&lt;/code&gt; type without explicit authorization"&lt;/em&gt; → From a production bug after TypeScript checks were bypassed.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;"Run the full test suite before committing, even for one-line changes"&lt;/em&gt; → From a regression where a small fix touched adjacent logic without running tests.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;"Back up configuration files before modifying"&lt;/em&gt; → From an agent that overwrote a production config.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rules derived from real incidents carry weight in the agent's reasoning. Rules written speculatively get treated as suggestions — not because the model is bad, but because they lack the contextual authority that real constraints carry.&lt;/p&gt;




&lt;h2&gt;
  
  
  Context Engineering: The Harness Layer People Miss
&lt;/h2&gt;

&lt;p&gt;There's a component of harness design that gets less attention than it deserves: context management.&lt;/p&gt;

&lt;p&gt;Antonio Gullí, Engineering Director at Google, defines &lt;strong&gt;Context Engineering&lt;/strong&gt; in &lt;em&gt;Agentic Design Patterns&lt;/em&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Not information dumping. Carefully selecting, trimming, and packaging context. To get AI to peak accuracy, you must give it short, focused, powerful context.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This distinguishes Context Engineering from the more common Prompt Engineering. Prompt Engineering asks: &lt;em&gt;How should I phrase this request?&lt;/em&gt; Context Engineering asks: &lt;em&gt;What should already be in front of the agent before it even sees the request?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The discipline applies to every part of the harness:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tool descriptions:&lt;/strong&gt; Concise and precise, not comprehensive&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skill files:&lt;/strong&gt; Exact schemas and templates the agent needs, not everything&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System prompts:&lt;/strong&gt; Specific constraints from real failures, not generic guidelines&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An agent drowning in context doesn't perform better — it performs worse. Every line in your CLAUDE.md or system prompt is doing Context Engineering. Noise in equals noise in the agent's reasoning.&lt;/p&gt;




&lt;h2&gt;
  
  
  Two-Tier Configuration: Team Brain + Personal Brain
&lt;/h2&gt;

&lt;p&gt;Claude Code's configuration architecture is worth understanding as a design pattern applicable to any agent harness.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project &lt;code&gt;.claude/&lt;/code&gt;&lt;/strong&gt; — lives in the repo, committed to Git&lt;br&gt;
Team-shared rules, hooks, security policies, workflow definitions. Every engineer who clones the repo inherits the full agent behavior constraints automatically. This is an engineering asset, maintained alongside code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Global &lt;code&gt;~/.claude/&lt;/code&gt;&lt;/strong&gt; — personal directory, stays out of Git&lt;br&gt;
Personal coding style preferences, cross-project shortcuts, individual tool configurations.&lt;/p&gt;

&lt;p&gt;The separation enforces the right ownership boundaries: team standards are reliable and shared, personal preferences are free and local. New team members inherit your agent setup the moment they clone the repository.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Changes When You See It This Way
&lt;/h2&gt;

&lt;p&gt;Once you internalize Agent = Model + Harness, the questions you ask about AI tools shift.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which model has better code generation?&lt;/li&gt;
&lt;li&gt;What's the context window size?&lt;/li&gt;
&lt;li&gt;What's the price per token?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;After:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How mature is this harness?&lt;/li&gt;
&lt;li&gt;What does the failure recovery path look like?&lt;/li&gt;
&lt;li&gt;How are harness rules maintained over time?&lt;/li&gt;
&lt;li&gt;What's the observability story?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model is table stakes at this point. The harness is the differentiator.&lt;/p&gt;

&lt;p&gt;Anthropic's engineering team published this framing directly:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The gap between what today's models can theoretically do and what you actually see them doing is largely a harness gap.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The ceiling isn't the model. The floor you're operating at is almost entirely determined by your harness.&lt;/p&gt;




&lt;h2&gt;
  
  
  Start Here
&lt;/h2&gt;

&lt;p&gt;Open your CLAUDE.md, or create one if it doesn't exist.&lt;/p&gt;

&lt;p&gt;Think about the last thing your agent got wrong. Not a model failure — a behavioral failure. Something it did that violated an expectation.&lt;/p&gt;

&lt;p&gt;Write one rule. Note where the failure came from. One sentence is enough.&lt;/p&gt;

&lt;p&gt;That's the first notch on the ratchet. Over months, this file becomes a compressed history of your collaboration — every line representing a mistake that was never repeated.&lt;/p&gt;

&lt;p&gt;The harness isn't designed. It's earned.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I write about practical AI engineering, agent design, and building production systems with Claude. Follow for more.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
      <category>claude</category>
    </item>
    <item>
      <title>How to Make AI Coding Agents Actually Follow Engineering Process</title>
      <dc:creator>mufeng</dc:creator>
      <pubDate>Sun, 07 Jun 2026 15:53:26 +0000</pubDate>
      <link>https://dev.to/changyou/how-to-make-ai-coding-agents-actually-follow-engineering-process-5b1b</link>
      <guid>https://dev.to/changyou/how-to-make-ai-coding-agents-actually-follow-engineering-process-5b1b</guid>
      <description>&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.amazonaws.com%2Fuploads%2Farticles%2Fbs1mpgipxfnnim9rvrcz.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.amazonaws.com%2Fuploads%2Farticles%2Fbs1mpgipxfnnim9rvrcz.png" alt="Engineering Process"&gt;&lt;/a&gt;&lt;br&gt;
The problem isn't that AI coding agents write bad code.&lt;/p&gt;

&lt;p&gt;The problem is that they skip steps.&lt;/p&gt;

&lt;p&gt;Ask an agent to fix a bug—it reads a few files, guesses a cause, patches the code. Ask it to add a feature—it starts writing before anyone's agreed on what the feature actually does. Ask it to refactor—it touches unrelated files, reformats half the codebase, and hands you a diff too large to review.&lt;/p&gt;

&lt;p&gt;None of this is stupidity. It's the absence of process discipline.&lt;/p&gt;

&lt;p&gt;Software development has always required workflow constraints: clarify before implementing, plan before coding, test before shipping, debug root causes not symptoms, verify before declaring done. The question is whether your AI agent follows them—or bypasses them entirely.&lt;/p&gt;

&lt;p&gt;Superpowers is a plugin framework for Claude Code and Codex that encodes those constraints as loadable, composable agent workflows. This is what it is, when to use it, and how to get started.&lt;/p&gt;


&lt;h2&gt;
  
  
  What "Skills" Actually Are
&lt;/h2&gt;

&lt;p&gt;The word "skill" is overloaded in AI contexts. Here it means something specific: a workflow protocol that loads into an agent session and constrains &lt;em&gt;how&lt;/em&gt; the agent approaches a category of task.&lt;/p&gt;

&lt;p&gt;Not "be more careful." Not a style guide. A specific sequence of steps with defined inputs, outputs, and verification gates.&lt;/p&gt;

&lt;p&gt;The analogy is a checklist for a surgeon or a pilot—not because either lacks expertise, but because cognitive discipline under pressure requires procedural anchors.&lt;/p&gt;

&lt;p&gt;The core Superpowers Skills cover the major failure modes in AI-assisted development:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Skill&lt;/th&gt;
&lt;th&gt;Failure Mode It Prevents&lt;/th&gt;
&lt;th&gt;What It Produces&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;brainstorming&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Implementing the wrong thing&lt;/td&gt;
&lt;td&gt;Clarified scope with edge cases surfaced&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;writing-plans&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Drifting mid-implementation&lt;/td&gt;
&lt;td&gt;Executable task list: file scope + verification per step&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;test-driven-development&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;"Works on my machine" guesswork&lt;/td&gt;
&lt;td&gt;RED-GREEN-REFACTOR cycles that lock behavior first&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;systematic-debugging&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Shotgun-patching symptoms&lt;/td&gt;
&lt;td&gt;Root cause hypotheses, evidence-based elimination, minimal fix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;verification-before-completion&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;"Should be done" claims&lt;/td&gt;
&lt;td&gt;Actual test runs, browser paths, or device checks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;requesting-code-review&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Merging unreviewed code&lt;/td&gt;
&lt;td&gt;Severity-ranked risk list before merge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;using-git-worktrees&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Task bleed across workstreams&lt;/td&gt;
&lt;td&gt;Isolated workspaces with clean baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These aren't independent tips—they chain into a complete development pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vague requirement
  → brainstorming  (scope + edge cases)
  → writing-plans  (executable task list)
  → test-driven-development  (behavior locked by tests)
  → requesting-code-review  (risks surfaced)
  → verification-before-completion  (actually verified)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  The Key Insight: Process Errors vs. Code Errors
&lt;/h2&gt;

&lt;p&gt;AI agents will get better at writing correct code over time. They won't automatically get better at following process—unless process is encoded somewhere.&lt;/p&gt;

&lt;p&gt;The bugs Superpowers Skills prevents aren't syntax errors or logic bugs. They're:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Building the wrong feature because nobody asked the right clarifying questions&lt;/li&gt;
&lt;li&gt;Writing code that "looks complete" but has zero coverage on the edge cases that matter&lt;/li&gt;
&lt;li&gt;Patching a symptom while the root cause persists&lt;/li&gt;
&lt;li&gt;Refactoring that expands scope until the diff is unmergeable&lt;/li&gt;
&lt;li&gt;Shipping because the agent said "done" without running anything&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A more capable model doesn't fix these. A faster agent arguably makes them worse—more code written in the wrong direction before anyone catches it.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Real Example: Adding Invoice Export
&lt;/h2&gt;

&lt;p&gt;Imagine you tell an agent: &lt;em&gt;"Add a billing export feature."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Without workflow constraints, it will probably find the billing service, write an endpoint, add a download button, and report completion. Whether that implementation handles empty data, unauthorized requests, large datasets, or export format edge cases depends entirely on whether the model guessed right.&lt;/p&gt;

&lt;p&gt;With Superpowers Skills, the flow looks like this:&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: &lt;code&gt;brainstorming&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Before touching any files, the agent surfaces questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Export format: PDF, CSV, or Excel?&lt;/li&gt;
&lt;li&gt;Date range limits?&lt;/li&gt;
&lt;li&gt;Permission checks required?&lt;/li&gt;
&lt;li&gt;Sync download or async background job?&lt;/li&gt;
&lt;li&gt;What does the user see on failure?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This isn't bureaucracy. This is the list of decisions that will otherwise get made silently—by the model, in the wrong direction.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: &lt;code&gt;writing-plans&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;A compliant plan doesn't say "implement invoice export." It says:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Add exportInvoiceCsv(userId, range) to billing service.
   Verify: unit tests covering empty data, normal data, unauthorized access.

2. Wire export endpoint in API routes.
   Verify: 403 on missing permissions, valid text/csv response on success.

3. Add download button to billing page.
   Verify: file downloads on click, loading and error states render correctly.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every task has a file scope and a verification gate. That's what makes it executable instead of aspirational.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: &lt;code&gt;test-driven-development&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Tests first. Not as documentation—as behavior contracts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;exportInvoiceCsv&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;it&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;exports invoices as csv rows&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="o"&gt;=&amp;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;csv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;exportInvoiceCsv&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;inv_001&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1999&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;currency&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;USD&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="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;inv_002&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2999&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;currency&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;USD&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;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toContain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;id,amount,currency&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toContain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;inv_001,1999,USD&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toContain&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;inv_002,2999,USD&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="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Write the failing test. Confirm it fails. Implement the minimum to pass. Confirm it passes. Then refactor. The order matters.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: &lt;code&gt;requesting-code-review&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Before merge, the review targets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does this match the agreed plan?&lt;/li&gt;
&lt;li&gt;Any authorization gaps?&lt;/li&gt;
&lt;li&gt;Large dataset edge cases?&lt;/li&gt;
&lt;li&gt;Unhandled error states?&lt;/li&gt;
&lt;li&gt;Files changed outside the agreed scope?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 5: &lt;code&gt;verification-before-completion&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Depending on project type:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Project Type&lt;/th&gt;
&lt;th&gt;Verification Method&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Web app&lt;/td&gt;
&lt;td&gt;Start dev server, walk the critical path in browser&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backend service&lt;/td&gt;
&lt;td&gt;Run tests, type check, hit the endpoint&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CLI tool&lt;/td&gt;
&lt;td&gt;Run the command, check actual output&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;iOS app&lt;/td&gt;
&lt;td&gt;Test on real device (especially IAP, StoreKit, permissions)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SDK / Library&lt;/td&gt;
&lt;td&gt;Unit tests + integration tests + example project&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The principle: &lt;em&gt;evidence over claims&lt;/em&gt;. "I think it's done" is not verification.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Install
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Claude Code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/plugin &lt;span class="nb"&gt;install &lt;/span&gt;superpowers@claude-plugins-official
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or via the Superpowers marketplace:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/plugin marketplace add obra/superpowers-marketplace
/plugin &lt;span class="nb"&gt;install &lt;/span&gt;superpowers@superpowers-marketplace
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Codex CLI
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/plugins
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Search &lt;code&gt;superpowers&lt;/code&gt;, select &lt;code&gt;Install Plugin&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Codex App
&lt;/h3&gt;

&lt;p&gt;Sidebar → Plugins → Coding category → Superpowers → &lt;code&gt;+&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  When to Use vs. Skip
&lt;/h2&gt;

&lt;p&gt;Not every task needs a full workflow. A typo fix doesn't need a plan. A one-liner doesn't need TDD.&lt;/p&gt;

&lt;p&gt;The right mental model is risk-proportional discipline:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Recommended Approach&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Typo fix, config lookup&lt;/td&gt;
&lt;td&gt;Direct action—just verify the output&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Single-file small change&lt;/td&gt;
&lt;td&gt;Optional workflow; at minimum verify&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bug with unclear root cause&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;systematic-debugging&lt;/code&gt; required&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;New feature&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;brainstorming&lt;/code&gt; + &lt;code&gt;writing-plans&lt;/code&gt; + TDD&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cross-module refactor&lt;/td&gt;
&lt;td&gt;Plan + verification strongly recommended&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pre-merge / pre-deploy&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;requesting-code-review&lt;/code&gt; + &lt;code&gt;verification-before-completion&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Skills should add friction proportional to the blast radius of getting it wrong.&lt;/p&gt;




&lt;h2&gt;
  
  
  Three Skills to Start With
&lt;/h2&gt;

&lt;p&gt;If you're integrating Superpowers into an existing project, don't try to use everything at once. Start with three:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;code&gt;systematic-debugging&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Tell the agent:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Use systematic-debugging. Do not modify any code yet. List your root cause hypotheses first, then we'll validate them one by one."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This stops the shotgun-patch reflex before it starts.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;writing-plans&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Before any non-trivial feature or change:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Use writing-plans. Produce an executable plan first. I'll confirm before you implement anything."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This surfaces scope creep before it happens, not after you're reviewing a 500-line diff.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;code&gt;verification-before-completion&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Add this to your project's &lt;code&gt;CLAUDE.md&lt;/code&gt; or &lt;code&gt;AGENTS.md&lt;/code&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Before declaring any task complete, use verification-before-completion. Run tests, verify in browser or device, report exactly what you checked and what the result was."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This closes the gap between "I think it works" and "I confirmed it works."&lt;/p&gt;




&lt;h2&gt;
  
  
  The Broader Pattern: Startup Superpowers
&lt;/h2&gt;

&lt;p&gt;Startup Superpowers—a companion project that applies the same framework to startup validation—illustrates why this pattern generalizes beyond coding.&lt;/p&gt;

&lt;p&gt;It applies the same idea (codify a professional workflow into loadable agent protocols) to hypothesis tracking, competitor research, customer interviews, and MVP scoping. Available slash commands:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/whats-next&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Assess current stage, recommend next action&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/competitors&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Map direct and indirect competitors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/market-research&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Research customers, pricing, and trends&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/hypotheses&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Write testable hypotheses with evidence tracking&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/interviews&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Design scripts and analyze transcripts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/surveys&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Design surveys and manage responses&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/mvp&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Design the minimum testable product&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Everything is stored as Markdown in a &lt;code&gt;startup/&lt;/code&gt; directory—version-controllable, agent-readable, no SaaS dependency.&lt;/p&gt;

&lt;p&gt;That's the actual pattern: take a repeatable professional workflow, encode it as agent steps with defined inputs and outputs, make it loadable in any session, and store all state in files the agent can read and write. The AI doesn't get smarter. The process gets stable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Superpowers Skills solves a specific problem: AI coding agents that know how to write code but don't know how to do software development.&lt;/p&gt;

&lt;p&gt;The six questions it forces an agent to answer before declaring a task complete:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Did you clarify the requirements before implementing?&lt;/li&gt;
&lt;li&gt;Did you make a verifiable plan before writing code?&lt;/li&gt;
&lt;li&gt;Did you write tests before the implementation?&lt;/li&gt;
&lt;li&gt;Did you find the root cause before patching?&lt;/li&gt;
&lt;li&gt;Did you get a review before merging?&lt;/li&gt;
&lt;li&gt;Did you actually verify—not just assume—that it works?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Without workflow constraints, developers have to ask these questions themselves, every session, every task. With Superpowers, the constraints are stable, loadable, and consistent across sessions, developers, and projects.&lt;/p&gt;

&lt;p&gt;If you're using AI coding agents in real projects today, start with three skills: &lt;code&gt;systematic-debugging&lt;/code&gt;, &lt;code&gt;writing-plans&lt;/code&gt;, and &lt;code&gt;verification-before-completion&lt;/code&gt;. They won't make development magical. They'll make your agent behave like a collaborator with engineering discipline instead of one without it.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Superpowers: &lt;a href="https://github.com/obra/superpowers" rel="noopener noreferrer"&gt;github.com/obra/superpowers&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Startup Superpowers: &lt;a href="https://github.com/SergeiGorbatiuk/startup-superpowers" rel="noopener noreferrer"&gt;github.com/SergeiGorbatiuk/startup-superpowers&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>codex</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
