<?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: Luca Del Puppo</title>
    <description>The latest articles on DEV Community by Luca Del Puppo (@puppo).</description>
    <link>https://dev.to/puppo</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%2F523927%2F5296f2d9-197f-48e5-bd4a-2e720b4f1ba2.JPG</url>
      <title>DEV Community: Luca Del Puppo</title>
      <link>https://dev.to/puppo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/puppo"/>
    <language>en</language>
    <item>
      <title>WebMCP in Practice - Build a WebMCP Tool with a Coding-Agent Skill</title>
      <dc:creator>Luca Del Puppo</dc:creator>
      <pubDate>Mon, 30 Nov 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/webmcp-in-practice-build-a-webmcp-tool-with-a-coding-agent-skill-4hnh</link>
      <guid>https://dev.to/playfulprogramming/webmcp-in-practice-build-a-webmcp-tool-with-a-coding-agent-skill-4hnh</guid>
      <description>&lt;p&gt;“Archive the completed DevDesk tasks.” Before anything disappears from the board, I want to see which cards will move. And if the board changes while I’m reading that list, I want a fresh review before I confirm.&lt;/p&gt;

&lt;p&gt;We’ll use that request to walk through Chrome’s &lt;code&gt;build-webmcp-tools&lt;/code&gt; skill. It gives a coding agent guidance for designing, implementing, and auditing WebMCP tools. The coding agent works on the DevDesk source. Later, a browser agent calls the tool that DevDesk exposes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install the skill in your project
&lt;/h2&gt;

&lt;p&gt;Start from Part 05 if you want to build the feature yourself. The board already has shared state, two imperative tools, and tests you can build on. Use Node.js 26 or later.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Puppo/webmcp-in-practice.git
&lt;span class="nb"&gt;cd&lt;/span&gt; webmcp-in-practice
git switch part-05-agent-evaluations
git switch -c archive-with-webmcp-skill
npm ci

npx skills add https://github.com/GoogleChromeLabs/webmcp-tools \
  --path webmcp-skills --skill build-webmcp-tools --agent antigravity --yes

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last command uses the Vercel Labs Skills CLI to install Chrome’s &lt;code&gt;build-webmcp-tools&lt;/code&gt; skill and its reference files in this project’s &lt;code&gt;.agents/skills&lt;/code&gt; directory. Open the DevDesk checkout in Antigravity and start a new session so it can discover the skill. If you use another coding agent, change &lt;code&gt;--agent antigravity&lt;/code&gt; to its supported name. &lt;a href="https://github.com/vercel-labs/skills" rel="noopener noreferrer"&gt;Skills CLI&lt;/a&gt; · &lt;a href="https://github.com/GoogleChromeLabs/webmcp-tools/tree/main/webmcp-skills" rel="noopener noreferrer"&gt;Chrome’s WebMCP skills installation guide&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Design the confirmation before writing code
&lt;/h2&gt;

&lt;p&gt;The skill supports different starting points, including designing one tool and implementing an approved design. Here the goal is already clear, so start with the archive workflow and ask for the design first. This is a prompt you can use:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Use the build-webmcp-tools skill to design one imperative tool for DevDesk. Inspect the current board state, tool registration, and storage code before proposing changes. The user wants to archive completed tasks, optionally for one project. Show exactly which cards would move and wait for the user to confirm in the page. Walk through success, cancellation, and a board change during review. Return a proposed input schema and acceptance checks before editing files.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Read the proposed flow as if you were using the app. When someone asks to archive the Design System tasks, the agent can supply the project name, and the page can identify the completed cards. The person still decides whether those exact cards should move. That decision belongs in the dialog. A &lt;code&gt;confirmed&lt;/code&gt; input would let the caller supply the decision itself.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Situation&lt;/th&gt;
&lt;th&gt;Expected behavior&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Completed tasks match the project&lt;/td&gt;
&lt;td&gt;Show their IDs, titles, and projects. Leave the board unchanged while review is open.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nothing matches&lt;/td&gt;
&lt;td&gt;Return a no-change result and skip the dialog.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The user confirms&lt;/td&gt;
&lt;td&gt;Move only the reviewed cards and report whether the save succeeded.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The user cancels or the request ends&lt;/td&gt;
&lt;td&gt;Leave the active tasks and archive as they were.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The board changes during review&lt;/td&gt;
&lt;td&gt;Return &lt;code&gt;STALE_PREVIEW&lt;/code&gt; and ask for a fresh review.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Turn the approved design into code
&lt;/h2&gt;

&lt;p&gt;Once the flow looks right, give the coding agent an implementation request:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Implement the approved archive flow in the existing TypeScript app using the build-webmcp-tools skill. Register &lt;code&gt;archive_completed_tasks&lt;/code&gt; with an optional string &lt;code&gt;project&lt;/code&gt; and reuse the current registration and board update paths. Connect it to a page dialog. Save only after confirmation and reject a stale preview. Preserve existing saved boards. Add tests that check active tasks and archived tasks before and after each outcome. Run &lt;code&gt;npm test&lt;/code&gt; and &lt;code&gt;npm run build&lt;/code&gt;, then show me where confirmation is enforced.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The skill gives the agent a place to check the tool schema, description, and response behavior. The app supplies the feature rules. In the reference implementation, the &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/webmcp.ts" rel="noopener noreferrer"&gt;tool adapter&lt;/a&gt; validates the optional project and waits for the review controller. The &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive-review.ts" rel="noopener noreferrer"&gt;controller&lt;/a&gt; keeps the operation pending while the dialog is open. The confirm handler checks the revision and calls the board’s save path.&lt;/p&gt;

&lt;p&gt;When you review the patch, follow that call chain. Look for a write before confirmation, a second route that can skip the dialog, or a fresh query on confirm that might pull in cards the user never saw. Ask the coding agent to audit those paths against the acceptance checks, then read the diff yourself. If your browser supports WebMCP, use Chrome DevTools’ &lt;strong&gt;Application → WebMCP&lt;/strong&gt; panel to inspect the tool and try the project filter. &lt;a href="https://developer.chrome.com/docs/devtools/application/webmcp" rel="noopener noreferrer"&gt;Chrome’s WebMCP debugging guide&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Run the reference implementation
&lt;/h2&gt;

&lt;p&gt;Use a separate checkout to compare your patch with the completed Part 06 example. &lt;a href="https://github.com/Puppo/webmcp-in-practice/tree/part-06-coding-agent-skills" rel="noopener noreferrer"&gt;Part 06 demo&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Puppo/webmcp-in-practice.git
&lt;span class="nb"&gt;cd&lt;/span&gt; webmcp-in-practice
git checkout part-06-coding-agent-skills
npm ci
npm &lt;span class="nb"&gt;test&lt;/span&gt;
npm run dev

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the URL printed by Vite. For the interactive archive exercise, you’ll need a browser and inspector or agent that can discover and invoke the native imperative tool. The automated tests cover the review logic with test doubles, including simulated dialog events. Native browser-agent execution has not been verified for this checkpoint. &lt;a href="https://developer.chrome.com/docs/ai/webmcp/imperative-api" rel="noopener noreferrer"&gt;Chrome’s imperative WebMCP guide&lt;/a&gt; · &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive-review.test.ts" rel="noopener noreferrer"&gt;Archive review tests&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Review the tasks before moving them
&lt;/h2&gt;

&lt;p&gt;On a reset board, move &lt;code&gt;DD-104&lt;/code&gt;, the Design System release notes, to &lt;strong&gt;Done&lt;/strong&gt;. Then call &lt;code&gt;archive_completed_tasks&lt;/code&gt; with &lt;code&gt;{ "project": "Design System" }&lt;/code&gt;. The dialog should list that task, with its ID, title, and project. Completed tasks from other projects stay out of that review. Omitting &lt;code&gt;project&lt;/code&gt; includes all completed tasks.&lt;/p&gt;

&lt;p&gt;Select &lt;strong&gt;Cancel&lt;/strong&gt; the first time and check that the card stays in &lt;strong&gt;Done&lt;/strong&gt;. Invoke the tool again and select &lt;strong&gt;Archive these tasks&lt;/strong&gt;. The card should move to the read-only archive below the board. The task is still there if you need to read it. The tool’s input has no confirmation argument. The app waits for the dialog’s confirm action before it applies the move. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/webmcp.ts" rel="noopener noreferrer"&gt;Tool definition&lt;/a&gt; · &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/index.html" rel="noopener noreferrer"&gt;Dialog markup&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F61tevauwbog0uyk2slde.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F61tevauwbog0uyk2slde.webp" alt="Archive review dialog listing DD-104 with Cancel and Archive these tasks buttons" width="800" height="503"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The dialog shows the exact task before confirmation. The screenshot was captured after calling the registered tool in Chrome Canary.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Apply the reviewed snapshot
&lt;/h2&gt;

&lt;p&gt;When the dialog opens, DevDesk captures the eligible task records and the board’s revision. Every update through the board state increments that revision. The confirm handler checks it before applying the archive. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive.ts" rel="noopener noreferrer"&gt;Archive operations&lt;/a&gt; · &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/state.ts" rel="noopener noreferrer"&gt;Board state&lt;/a&gt;&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="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;applyArchive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;ReturnType&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="n"&gt;prepareArchive&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;currentRevision&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="nc"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;archived&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="nc"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;revision&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="n"&gt;currentRevision&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'STALE_PREVIEW'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;ids&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;ids&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;has&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;archived&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;archived&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;preview&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the revision differs, the operation returns &lt;code&gt;STALE_PREVIEW&lt;/code&gt; and asks for a new review. If it matches, the app moves only the reviewed IDs. &lt;strong&gt;Cancel&lt;/strong&gt; , Escape, an invocation abort, or the two-minute timeout ends a pending review without moving anything. The dialog blocks ordinary interaction with the board behind it. The stale-review test simulates a state change by advancing the revision before confirming. The revision belongs to the current page, so this check covers state changes in that page. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive-review.ts" rel="noopener noreferrer"&gt;Review controller&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;DevDesk saves active and archived tasks together under a version 2 storage key and reports &lt;code&gt;persisted&lt;/code&gt; after a move. When the new key is absent, it can load the old board with an empty archive. The next save writes the new snapshot and leaves the original intact. Earlier checkpoints still read their original snapshot. The storage tests cover this migration, archive reload, and duplicate IDs across the two collections. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive-storage.ts" rel="noopener noreferrer"&gt;Archive storage&lt;/a&gt; · &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive-storage.test.ts" rel="noopener noreferrer"&gt;Storage tests&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the result
&lt;/h2&gt;

&lt;p&gt;A successful tool response is only part of the check. In the &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/src/archive-review.test.ts" rel="noopener noreferrer"&gt;archive review tests&lt;/a&gt;, the archive starts empty, stays empty while review is pending, and contains &lt;code&gt;DD-104&lt;/code&gt; after confirmation. The cancellation and stale-review tests also check that &lt;code&gt;DD-104&lt;/code&gt; is still on the active board. Those assertions catch a patch that returns the right response while changing the wrong state. &lt;a href="https://blog.delpuppo.net/webmcp-in-practice/webmcp-agent-evaluations/" rel="noopener noreferrer"&gt;Part 05 — Test Agent Outcomes, Not Just Tool Calls&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The reference branch carries forward Part 05’s local evaluations and live simulations and adds &lt;code&gt;archive_completed_tasks&lt;/code&gt; to the static tool catalog. The inherited cases still exercise the earlier board workflows. Use the archive review tests above to check confirmation and cancellation. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-06-coding-agent-skills/docs/evaluations.md" rel="noopener noreferrer"&gt;Reference evaluation guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to measure what the skill adds, repeat the exercise in two clean checkouts from the same Part 05 revision. Keep the prompt, model, and checks fixed, and give only one session access to the skill. Compare the diffs, the outcomes, and the corrections each patch needed. The demo is a reference implementation for this walkthrough. A controlled comparison is still to run.&lt;/p&gt;

</description>
      <category>webmcp</category>
      <category>ai</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Building the Modern Web with AI: Modernizing Existing UI with Modern Web Guidance</title>
      <dc:creator>Luca Del Puppo</dc:creator>
      <pubDate>Thu, 26 Nov 2026 23:00:00 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/building-the-modern-web-with-ai-modernizing-existing-ui-with-modern-web-guidance-m89</link>
      <guid>https://dev.to/playfulprogramming/building-the-modern-web-with-ai-modernizing-existing-ui-with-modern-web-guidance-m89</guid>
      <description>&lt;p&gt;Open a profile form for the first time, and the empty name already has a red border. You haven't typed anything yet. Further down, the bio grows as you type, using JavaScript to measure its content and update its height.&lt;/p&gt;

&lt;p&gt;Both behaviors give us something concrete to investigate with &lt;strong&gt;Modern Web Guidance&lt;/strong&gt;. Can we improve when the form shows errors? Can the browser handle the growing textarea while keeping it usable in older browsers?&lt;/p&gt;

&lt;p&gt;In part one, we used the skill's guides to understand implementation choices in Common Ground, our small preferences demo. This time, we'll use its modernization workflow on existing code. You'll need Git, Node.js 26 or newer, and npm. Basic HTML, CSS, and JavaScript knowledge is enough to follow the changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with a form we can inspect
&lt;/h2&gt;

&lt;p&gt;The repository has two branches for this exercise, &lt;code&gt;article-2/legacy&lt;/code&gt; and &lt;code&gt;article-2/modernized&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The starting branch is a deliberately prepared teaching variant of Common Ground. It adds unconditional JavaScript auto-resizing and premature &lt;code&gt;:invalid&lt;/code&gt; styling. A new profile starts empty so you can observe the error timing. These choices make the exercise repeatable and keep its scope small.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Puppo/modern-web-guidance-demos.git modern-web-guidance-modernization
&lt;span class="nb"&gt;cd&lt;/span&gt; modern-web-guidance-modernization
git switch article-2/legacy
npm ci
npm start

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;a href="http://127.0.0.1:4173/" rel="noopener noreferrer"&gt;the local demo&lt;/a&gt; and choose &lt;strong&gt;Edit profile&lt;/strong&gt;. Inspect the empty name before typing, then enter several lines in &lt;strong&gt;Bio&lt;/strong&gt; and remove some of them. The textarea expands and contracts.&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%2Fjt1ntozudf1pu3ev3ytk.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%2Fjt1ntozudf1pu3ev3ytk.png" alt="The untouched profile form, with a red error border around the empty name" width="512" height="552"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The exercise uses its own local storage key, &lt;code&gt;mwg-modernization-v1&lt;/code&gt;. If you've already saved a profile here, remove that key in DevTools and reload to repeat the empty-field example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ask for a modernization plan
&lt;/h2&gt;

&lt;p&gt;Open the checkout in Google Antigravity with Modern Web Guidance enabled. You can ask the agent to inspect the repository with this prompt:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Modernize this repository using Modern Web Guidance. Scan the frontend files for legacy patterns, verify each finding against the surrounding code, and propose a plan before editing. Target Baseline Widely available features, with progressive enhancement for newer features. Automatic textarea growth is optional in older browsers, but editing, scrolling, saving, and canceling must remain usable. For each proposed change, identify the guide and describe how to verify the behavior.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is a suggested reader prompt. The recorded work behind this article used the CLI commands below and a review of the retrieved guides. An Antigravity session may present its findings differently.&lt;/p&gt;

&lt;p&gt;The modernization workflow scans for recognizable legacy patterns, asks the agent to check their context, and then uses the matching guides to inform changes. A result includes criteria called &lt;code&gt;keepWhen&lt;/code&gt; and &lt;code&gt;dropWhen&lt;/code&gt;, which help distinguish an applicable finding from code that should stay. &lt;a href="https://developer.chrome.com/docs/modern-web-guidance/modernization-workflow" rel="noopener noreferrer"&gt;Google's modernization workflow&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can inspect the scan directly from a second terminal in the repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx --yes modern-web-guidance@1.0.1 legacy-scan . --json

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The recorded run used version 1.0.1 and checked 52 rules across 38 guides. It returned two findings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In &lt;code&gt;app.js&lt;/code&gt;, the bio resizes through a JavaScript &lt;code&gt;scrollHeight&lt;/code&gt; measurement.&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;styles.css&lt;/code&gt;, &lt;code&gt;input:invalid&lt;/code&gt; applies an error border before interaction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check the surrounding code before accepting either proposal. Our resize handler runs on every input event and has no feature check. Our error rule has no interaction guard. Both findings apply to this exercise. The saved JSON includes the complete criteria. &lt;a href="https://github.com/Puppo/modern-web-guidance-demos/blob/b2b1169/verification/modernization/scan-before.json" rel="noopener noreferrer"&gt;Recorded scan&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Let the bio grow through CSS
&lt;/h2&gt;

&lt;p&gt;Retrieve the guide associated with the first finding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx --yes modern-web-guidance@1.0.1 retrieve form-fields-automatically-fit-contents

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The starting implementation measures the textarea after each edit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;resizeBio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;bioInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'auto'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;borderHeight&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bioInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;offsetHeight&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;bioInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;clientHeight&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;bioInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bioInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;scrollHeight&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;borderHeight&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s1"&gt;'px'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;bioInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'input'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;resizeBio&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;It also calls &lt;code&gt;resizeBio()&lt;/code&gt; after opening the dialog so the saved bio fits. The guide points us toward &lt;code&gt;field-sizing: content&lt;/code&gt;, with size constraints and an explicit fallback decision.&lt;/p&gt;

&lt;p&gt;For this demo, automatic growth is optional. A standard scrolling textarea remains usable when the property is unsupported. That lets us remove the helper, its input listener, and its call on opening.&lt;/p&gt;

&lt;p&gt;The resulting sizing rules are:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nt"&gt;textarea&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;resize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;vertical&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;min-block-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3lh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;max-block-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;7lh&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@supports&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;field-sizing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;content&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nn"&gt;#bio&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;field-sizing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;block-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;auto&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;The existing form styles keep the width at &lt;code&gt;100%&lt;/code&gt;. The &lt;code&gt;lh&lt;/code&gt; unit bases the height limits on line height. With support, the field grows vertically until it reaches the maximum and then scrolls. With the enhancement unavailable, the HTML &lt;code&gt;rows&lt;/code&gt; attribute and normal resizing behavior provide the fallback.&lt;/p&gt;

&lt;p&gt;The removal of the inline height is part of the change. Leaving an explicit height from the old helper would interfere with content-based sizing. This is why reading the guide matters beyond finding a new CSS property. &lt;a href="https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/form-fields-automatically-fit-contents.md" rel="noopener noreferrer"&gt;Sizing guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl61b7drr1yff5858ouch.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%2Fl61b7drr1yff5858ouch.png" alt="The modernized profile form with a bio expanded to fit several lines" width="512" height="626"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Show an error after interaction
&lt;/h2&gt;

&lt;p&gt;Now retrieve the second guide:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx --yes modern-web-guidance@1.0.1 retrieve validate-input-after-interaction

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The starting selector matches as soon as the required name is empty:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nn"&gt;#profile-form&lt;/span&gt; &lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nt"&gt;invalid&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;border-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;--error&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;The guide recommends &lt;code&gt;:user-invalid&lt;/code&gt; for feedback that follows interaction or an attempted submission:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nn"&gt;#profile-form&lt;/span&gt; &lt;span class="nt"&gt;input&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nt"&gt;user-invalid&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;border-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;--error&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;Open the modernized form and the empty name starts with a neutral border. Type spaces and move to Bio, or attempt to save the empty form, and the error appears.&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%2Fhzqq94j3qdemjq2ywayr.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%2Fhzqq94j3qdemjq2ywayr.png" alt="The same untouched form after modernization, with a neutral name field border" width="512" height="530"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There is another requirement in the guide. The visible state must agree with the field's accessible state and error description. Changing the CSS selector alone leaves that work unfinished.&lt;/p&gt;

&lt;p&gt;Our name field starts with &lt;code&gt;aria-invalid="false"&lt;/code&gt; and &lt;code&gt;aria-describedby="name-help"&lt;/code&gt;. When the error appears, the script sets &lt;code&gt;aria-invalid="true"&lt;/code&gt;, adds &lt;code&gt;name-error&lt;/code&gt; to the description, and supplies an explanation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Enter a display name with at least one non-space character.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After input or blur, the script reads the browser's interaction state:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;syncNameFeedback&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nameInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;matches&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;':user-invalid'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nf"&gt;showNameError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="nf"&gt;clearNameError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The helpers update the text and ARIA together. A polite live region inside the dialog announces errors after field interaction. An invalid submit focuses the name with its linked explanation. Correction and cancellation clear pending feedback. The error container reserves space so the buttons stay in place as the message changes.&lt;/p&gt;

&lt;p&gt;This keeps the existing &lt;code&gt;required&lt;/code&gt; and whitespace constraint, and Cancel still bypasses validation. The guide has shaped both the timing and the accessible feedback. &lt;a href="https://github.com/GoogleChrome/modern-web-guidance/blob/main/skills/modern-web-guidance/guides/forms/validate-input-after-interaction.md" rel="noopener noreferrer"&gt;Validation guide&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try the completed version
&lt;/h2&gt;

&lt;p&gt;Stop the server, then switch branches:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git switch article-2/modernized
npm ci
npm start

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Reload every open demo tab&lt;/strong&gt; to load the updated code. Try these interactions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the empty profile. Check that the name starts neutral.&lt;/li&gt;
&lt;li&gt;Enter spaces and leave the name. Check the error text, then correct the value.&lt;/li&gt;
&lt;li&gt;Cancel and reopen. Confirm that both the draft and error state reset.&lt;/li&gt;
&lt;li&gt;Paste several lines into Bio, shorten the text, and save. Reopen to check the saved value and field size.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Run the scan again:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx --yes modern-web-guidance@1.0.1 legacy-scan . --json

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our second run returned zero findings within the scanner's supported rules. The browser checks provide the next piece of evidence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx playwright install chromium firefox webkit
npm &lt;span class="nb"&gt;test&lt;/span&gt; -- --workers=1

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The modernized branch passed &lt;strong&gt;20 scenarios across three browser engines&lt;/strong&gt; , for 60 executions. Five added scenarios cover validation timing, correction, cancellation, textarea sizing, and fallback presentation. The fallback check disables content sizing in a current browser and confirms scrolling and saving at mobile width. Actual older browsers and screen-reader speech still need their own checks. &lt;a href="https://github.com/Puppo/modern-web-guidance-demos/blob/af6fa0d/verification/modernization/README.md" rel="noopener noreferrer"&gt;Results and coverage&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Take the workflow to your own code
&lt;/h2&gt;

&lt;p&gt;The useful output is a decision you can explain. Here, the sizing guide helped us remove a measurement handler while choosing an acceptable fallback. The validation guide led us from a selector change to consistent visual and programmatic feedback.&lt;/p&gt;

&lt;p&gt;Try the same workflow on a small frontend folder. Ask for a plan, read the relevant guide with the proposed diff, and exercise the behavior that justified the change. The repository preserves both versions so you can compare each decision. &lt;a href="https://github.com/Puppo/modern-web-guidance-demos/compare/b2b1169...af6fa0d" rel="noopener noreferrer"&gt;Before and after&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bye bye!&lt;/p&gt;

</description>
      <category>web</category>
      <category>ai</category>
      <category>a11y</category>
    </item>
    <item>
      <title>WebMCP in Practice - Test Agent Outcomes, Not Just Tool Calls</title>
      <dc:creator>Luca Del Puppo</dc:creator>
      <pubDate>Thu, 26 Nov 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/webmcp-in-practice-test-agent-outcomes-not-just-tool-calls-23h5</link>
      <guid>https://dev.to/playfulprogramming/webmcp-in-practice-test-agent-outcomes-not-just-tool-calls-23h5</guid>
      <description>&lt;p&gt;Imagine an agent calls &lt;code&gt;list_tasks&lt;/code&gt;, then &lt;code&gt;set_task_status&lt;/code&gt;, and tells you the Design System release notes are done. Open DevDesk and there it is, the wrong card in &lt;strong&gt;Done&lt;/strong&gt;. Both tool names look right in the trace. The arguments and the board tell a different story.&lt;/p&gt;

&lt;p&gt;In Part 04, we made the tools report what happened when a task moved, an ID went stale, or a save failed. Now we can turn those outcomes into checks. We’ll start with the application behavior we can run locally, then use Chrome’s WebMCP Evals CLI to check the model’s calls and write a simulation that inspects the live board. &lt;a href="https://blog.delpuppo.net/webmcp-in-practice/webmcp-state-errors-user-control/" rel="noopener noreferrer"&gt;Part 04 — Keep Tools Honest When State Changes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxkp5oloay2553s3ea97w.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxkp5oloay2553s3ea97w.webp" alt="DD-101 in Done while the Design System task DD-104 is still In progress" width="799" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;An intentionally reproduced failure state. The DevDesk card moved while the Design System card stayed put.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Run the application checks
&lt;/h2&gt;

&lt;p&gt;With Node.js 26 or later, check out the branch for this chapter. The smoke test invokes the application’s imperative handlers in memory. You can run it without starting Vite, connecting a browser, or configuring a model. &lt;a href="https://github.com/Puppo/webmcp-in-practice/tree/part-05-agent-evaluations" rel="noopener noreferrer"&gt;Part 05 demo&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Puppo/webmcp-in-practice.git
&lt;span class="nb"&gt;cd&lt;/span&gt; webmcp-in-practice
git checkout part-05-agent-evaluations
npm ci
npm run eval:smoke
npm &lt;span class="nb"&gt;test&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use &lt;code&gt;npm run dev&lt;/code&gt; if you also want to open the board and try the examples by hand. The full suite runs the smoke cases alongside the task, storage, and registration tests. It also checks that &lt;code&gt;evals/schema.json&lt;/code&gt; matches the imperative registrations and the schema we expect Chrome to generate from the declarative form. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/src/schema.test.ts" rel="noopener noreferrer"&gt;Schema drift test&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Check what actually changed
&lt;/h2&gt;

&lt;p&gt;The test starts from fresh fixtures and copies the board before invoking the tools. It captures each definition using a mock &lt;code&gt;registerTool&lt;/code&gt;, then calls the real &lt;code&gt;execute&lt;/code&gt; handlers with arguments supplied by the test. The storage outcome is supplied by the in-memory adapter. Here’s the case for the duplicate title. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/src/eval-smoke.test.ts" rel="noopener noreferrer"&gt;Smoke test source&lt;/a&gt;&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="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;board&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;freshBoard&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;before&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;structuredClone&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;board&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;matches&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;board&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'list_tasks'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Design System'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'release notes'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;matches&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'DD-104'&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="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;board&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'set_task_status'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;taskId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;matches&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'done'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toMatchObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;changed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;persisted&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;board&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tasks&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;before&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'DD-104'&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="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;board&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'set_task_status'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;taskId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'DD-104'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'done'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toMatchObject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;changed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&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;The board comparison catches an update to &lt;code&gt;DD-101&lt;/code&gt; even if the tool response looks successful. This test compares fixture rows by position, which works for an operation that preserves order. For a wider workflow that can insert, remove, or reorder tasks, compare snapshots by ID and check the expected fields.&lt;/p&gt;

&lt;p&gt;Five smoke tests check board outcomes. They cover the qualified update and its repeat, the two results from an ambiguous lookup, the missing ID, instruction-like text returned as task data, and an update when persistence reports failure. The ambiguous lookup test proves that listing leaves the board alone. Whether an agent asks which project the user meant is a separate behavior to evaluate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run the local model evaluation
&lt;/h2&gt;

&lt;p&gt;The demo pins &lt;code&gt;webmcp-evals&lt;/code&gt; 0.1.0. From the same checkout, copy the example environment file and set &lt;code&gt;GOOGLE_AI&lt;/code&gt; in &lt;code&gt;.env&lt;/code&gt; to your Gemini API key. Then run the evaluation. This uses the default &lt;code&gt;vercel&lt;/code&gt; backend and &lt;code&gt;gemini-3.5-flash&lt;/code&gt; model. It makes model requests that can incur charges. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/docs/evaluations.md" rel="noopener noreferrer"&gt;Demo evaluation setup&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cp .env.example .env
&lt;span class="c"&gt;# Set GOOGLE_AI in .env before running the command.&lt;/span&gt;
npm run eval:local

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script runs &lt;code&gt;webmcp-evals local -t evals/schema.json -e evals/evals.json&lt;/code&gt;. The 13 cases send user messages and static tool definitions to the model. The CLI compares the calls it gets back with &lt;code&gt;expectedCall&lt;/code&gt;. Reports go into &lt;code&gt;.evals/&lt;/code&gt;. To repeat each case three times, pass &lt;code&gt;-r 3&lt;/code&gt; after &lt;code&gt;--&lt;/code&gt;. &lt;a href="https://developer.chrome.com/docs/ai/webmcp/evals" rel="noopener noreferrer"&gt;Chrome’s WebMCP evaluation guide&lt;/a&gt; · &lt;a href="https://github.com/GoogleChromeLabs/webmcp-tools/tree/main/webmcp-evals" rel="noopener noreferrer"&gt;WebMCP Evals CLI&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run eval:local -- -r 3

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Follow the calls from lookup to update
&lt;/h3&gt;

&lt;p&gt;Take “I just finished writing the Design System release notes.” The &lt;code&gt;ordered&lt;/code&gt; group expects a call to &lt;code&gt;list_tasks&lt;/code&gt; with a release-notes query, followed by &lt;code&gt;set_task_status&lt;/code&gt; with &lt;code&gt;taskId: "DD-104"&lt;/code&gt; and &lt;code&gt;status: "done"&lt;/code&gt;. The lookup mock returns both release-notes tasks, so the model can use the project in each result to pick the right ID. An extra &lt;code&gt;project&lt;/code&gt; argument is allowed because the CLI matches arguments as a subset. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/evals/evals.json" rel="noopener noreferrer"&gt;Model cases&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Local mode returns each &lt;code&gt;mockOutput&lt;/code&gt; by tool name. With that setup, the model can get a useful result even when it sends the wrong arguments. The CLI checks those arguments separately. DevDesk’s smoke suite replays the imperative mocks against the real handlers with sample arguments to catch drift. The model run uses fixtures throughout, so it leaves the board untouched.&lt;/p&gt;

&lt;h3&gt;
  
  
  Check the values the browser expects
&lt;/h3&gt;

&lt;p&gt;The static catalog includes &lt;code&gt;create_task&lt;/code&gt; alongside the imperative tools. A local run exposed a mismatch: the model sent &lt;code&gt;High&lt;/code&gt;, the label it saw, but the form expected the value &lt;code&gt;high&lt;/code&gt;. The form now uses &lt;code&gt;Low&lt;/code&gt;, &lt;code&gt;Medium&lt;/code&gt; and &lt;code&gt;High&lt;/code&gt; as both labels and values. Chrome can represent them as a simple enum, and the submit handler lowercases the selected value before saving. You can compare the catalog with the browser’s generated schema in &lt;strong&gt;Application → WebMCP&lt;/strong&gt; in Chrome DevTools. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/index.html" rel="noopener noreferrer"&gt;Form source&lt;/a&gt; · &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/evals/schema.json" rel="noopener noreferrer"&gt;Static tool catalog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The demo’s November 15 run records &lt;strong&gt;51 of 51 passing steps&lt;/strong&gt; with &lt;code&gt;gemini-3.5-flash&lt;/code&gt; and three runs per case. Earlier attempts helped refine the expectations. For instance, &lt;code&gt;keyboard&lt;/code&gt; is a valid substring search for “Check keyboard navigation,” and an indirect release-notes request can resolve to &lt;code&gt;DD-104&lt;/code&gt; without a project filter. The passing steps describe the model’s calls in this run. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/docs/evaluations.md#latest-local-run" rel="noopener noreferrer"&gt;Recorded local run&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Simulate an outcome on the live board
&lt;/h2&gt;

&lt;p&gt;What happens if you say “Complete the release notes task” and leave out the project? We want both cards to stay in their original lanes and the agent to ask which one you mean. The simulation can check both parts. Install Chrome Canary, the CLI’s default browser, and use the same Gemini key in &lt;code&gt;.env&lt;/code&gt;. Start the app on port 5173, then run the simulation from another terminal. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/docs/evaluations.md#run-the-outcome-simulations" rel="noopener noreferrer"&gt;Simulation setup&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run dev -- --port 5173 --strictPort


npm run eval:simulate -- --model google:gemini-3.5-flash --judge-model google:gemini-3.8-flash

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The script runs &lt;code&gt;webmcp-evals simulate -u http://localhost:5173 -s evals/simulations.json&lt;/code&gt;. Each trial starts with fresh browser storage and the example board. Here’s one assertion from the ambiguous-title case. It checks that the Design System card is still in &lt;strong&gt;In progress&lt;/strong&gt;.&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="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"dom"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"selector"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"[data-status='in-progress'] [data-task-id='DD-104']"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"expect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"exists"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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;The other assertions check the DevDesk card and the number of cards in &lt;strong&gt;Done&lt;/strong&gt;. The case’s &lt;code&gt;successCriteria&lt;/code&gt; asks the model judge to check that the agent names both projects and asks which task the user meant. Another case uses a simulated user who supplies the project only after the agent asks. Both agent and judge can make billable model requests. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-05-agent-evaluations/evals/simulations.json" rel="noopener noreferrer"&gt;Live simulation cases&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The branch contains seven simulations. A live run is still pending, including the creation case where the browser waits for a person to submit the form. That case expects the board to keep its original six cards. If the runner times out while the form is waiting, inspect the pending review and record the timeout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try a paraphrase
&lt;/h2&gt;

&lt;p&gt;Change the ordered case prompt to “The release notes for the design system are ready. Can you close that task?” Run the local evaluation again and check which ID the model chooses. Then try the same wording in the qualified-title simulation and check where &lt;code&gt;DD-104&lt;/code&gt; and &lt;code&gt;DD-101&lt;/code&gt; end up. The call trace shows what the model tried. The DOM assertions show where the cards landed.&lt;/p&gt;

&lt;p&gt;In the final chapter, we’ll use a coding-agent skill to build a task archive with human review.&lt;/p&gt;

</description>
      <category>webmcp</category>
      <category>ai</category>
      <category>typescript</category>
    </item>
    <item>
      <title>WebMCP in Practice — Keep Tools Honest When State Changes</title>
      <dc:creator>Luca Del Puppo</dc:creator>
      <pubDate>Mon, 23 Nov 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/webmcp-in-practice-keep-tools-honest-when-state-changes-cg5</link>
      <guid>https://dev.to/playfulprogramming/webmcp-in-practice-keep-tools-honest-when-state-changes-cg5</guid>
      <description>&lt;p&gt;An agent lists the DevDesk tasks and finds the one you just created. Before it calls &lt;code&gt;set_task_status&lt;/code&gt;, you reset the example board. The agent still has a perfectly valid-looking ID. The board has six fixtures and no sign of that task.&lt;/p&gt;

&lt;p&gt;In Part 03, we separated finding a task from changing its status. That gave us a precise way to point at a task, but the board can still change between those two calls. Today, we’ll give the caller enough information to recover from a stale ID, explain an update that did nothing, and say when a change exists only in the current tab. &lt;a href="https://blog.delpuppo.net/webmcp-in-practice/webmcp-imperative-tools/" rel="noopener noreferrer"&gt;Part 03 — Find the Right Task and Update It&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Run DevDesk
&lt;/h2&gt;

&lt;p&gt;With Node.js 26 or later installed, check out the branch for this chapter and start Vite. &lt;a href="https://github.com/Puppo/webmcp-in-practice/tree/part-04-state-errors" rel="noopener noreferrer"&gt;Part 04 demo&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Puppo/webmcp-in-practice.git
&lt;span class="nb"&gt;cd&lt;/span&gt; webmcp-in-practice
git checkout part-04-state-errors
npm ci
npm run dev

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the URL printed by Vite. The board works by hand in an ordinary modern browser. To invoke the native tools, use a compatible browser and inspector or agent, then check that it discovers &lt;code&gt;list_tasks&lt;/code&gt; and &lt;code&gt;set_task_status&lt;/code&gt;. &lt;a href="https://developer.chrome.com/docs/ai/webmcp/imperative-api" rel="noopener noreferrer"&gt;Chrome’s imperative WebMCP guide&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the board at execution time
&lt;/h2&gt;

&lt;p&gt;The schema describes the tool’s inputs, including the allowed statuses. Inside the callback, DevDesk also checks that the ID is a nonblank string and the status is supported. It then looks up the ID in the current board. Here’s the start of the callback. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-04-state-errors/src/webmcp.ts" rel="noopener noreferrer"&gt;Tool source&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;taskId&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="s1"&gt;'string'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
  &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;taskId&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
  &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nf"&gt;isStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;output&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'INVALID_INPUT'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Provide a task ID and valid status.'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;board&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTasks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;taskId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;output&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'TASK_NOT_FOUND'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Task not found. List tasks and choose a current ID.'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;INVALID_INPUT&lt;/code&gt; points the caller back to the arguments. &lt;code&gt;TASK_NOT_FOUND&lt;/code&gt; asks it to refresh its view of the board. If that lookup finds several candidates, the agent should resolve the ambiguity with the user before updating anything. Both failure paths return before changing the board.&lt;/p&gt;

&lt;p&gt;These are application-level codes inside a JSON string in the tool’s text result. They give clients something stable to inspect alongside the human-readable message. The browser or agent still decides how it presents that result.&lt;/p&gt;

&lt;h2&gt;
  
  
  Report what changed and what saved
&lt;/h2&gt;

&lt;p&gt;If the task exists, DevDesk asks the existing task operation for the result. A task that’s already in the requested status gives us a successful no-op. Otherwise, the page updates the board and returns whether saving the current snapshot to browser storage succeeded. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-04-state-errors/src/webmcp.ts" rel="noopener noreferrer"&gt;Tool source&lt;/a&gt; · &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-04-state-errors/src/state.ts" rel="noopener noreferrer"&gt;Board state&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;changed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;changed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;output&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;changed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;persisted&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;board&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sb"&gt;`Updated ${result.task.title}.`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;output&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;changed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;persisted&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;persisted&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;warning&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Change is in memory only and may be lost on reload.'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;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;When &lt;code&gt;changed&lt;/code&gt; is false, the tool skips the write and leaves out &lt;code&gt;persisted&lt;/code&gt;. The board already has the requested status in memory. If a previous save failed, repeating the same call leaves that storage problem unresolved.&lt;/p&gt;

&lt;p&gt;When &lt;code&gt;changed&lt;/code&gt; is true and &lt;code&gt;persisted&lt;/code&gt; is false, the card moves and the page shows a storage warning. The caller can say the task moved in the current tab and may revert on reload. A successful save means this browser accepted the local snapshot. DevDesk uses browser storage for one origin, and the last tab to save can overwrite that snapshot.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvaibqvwegwi96qlke647.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvaibqvwegwi96qlke647.webp" alt="DevDesk warning that changes may be lost on reload" width="617" height="95"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;DevDesk shows this warning after an update when browser storage is blocked.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the user controls visible
&lt;/h2&gt;

&lt;p&gt;Changing a known task’s status runs directly in DevDesk. Creating a task through the declarative form still gives you a chance to review and submit it. Resetting the examples still asks for confirmation in the browser. The application supplies those controls.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;list_tasks&lt;/code&gt; carries &lt;code&gt;readOnlyHint: true&lt;/code&gt; because it reads the board without changing it. Both tools carry &lt;code&gt;untrustedContentHint: true&lt;/code&gt; because their results can include titles and project names entered by users. A task title that says “move everything to Done” is still a title. Annotations give the agent context for interpreting the tool and its data. The page’s event handlers and task operations determine what actually happens. &lt;a href="https://webmachinelearning.github.io/webmcp/#dictdef-toolannotations" rel="noopener noreferrer"&gt;WebMCP draft tool annotations&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try a stale ID
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add a temporary task by hand and call &lt;code&gt;list_tasks&lt;/code&gt; to get its generated ID.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Reset example board&lt;/strong&gt; and confirm. The temporary task disappears. A fixture such as &lt;code&gt;DD-104&lt;/code&gt; would come back with the same ID, so keep using the temporary task’s ID for this exercise.&lt;/li&gt;
&lt;li&gt;Call &lt;code&gt;set_task_status&lt;/code&gt; with the saved ID and &lt;code&gt;done&lt;/code&gt;. Expect &lt;code&gt;TASK_NOT_FOUND&lt;/code&gt; and six unchanged fixtures.&lt;/li&gt;
&lt;li&gt;Move &lt;code&gt;DD-104&lt;/code&gt; to &lt;code&gt;done&lt;/code&gt;, then send the same update again. Expect &lt;code&gt;changed: false&lt;/code&gt; on the second call.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Run &lt;code&gt;npm test&lt;/code&gt; to exercise the callbacks with a mocked model context, including the storage-failure response. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-04-state-errors/src/webmcp.test.ts" rel="noopener noreferrer"&gt;Tool tests&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Watch what happens after a reset
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/l64QqqkJ4vc" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I ask the agent to move a temporary task to another column. Once it replies, I reset the example board. The reset removes the temporary task. Then I ask the agent to move that same task to &lt;strong&gt;In progress&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The agent searches the current board and tells me the task is gone. It asks whether I’d like to move a task that’s still there. That leaves the choice with me and keeps the remaining cards in place. The video shows how the agent handles a missing task through a fresh search. The exercise above checks what the update tool returns if you pass it the old ID directly.&lt;/p&gt;

&lt;p&gt;In the next chapter, we’ll compare the board before and after a request to evaluate a complete agent workflow.&lt;/p&gt;

</description>
      <category>webmcp</category>
      <category>ai</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Building the Modern Web with AI: Getting Started with Modern Web Guidance</title>
      <dc:creator>Luca Del Puppo</dc:creator>
      <pubDate>Thu, 19 Nov 2026 23:00:00 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/building-the-modern-web-with-ai-getting-started-with-modern-web-guidance-26fe</link>
      <guid>https://dev.to/playfulprogramming/building-the-modern-web-with-ai-getting-started-with-modern-web-guidance-26fe</guid>
      <description>&lt;p&gt;Ask a coding agent to build a settings page, and there are several ways it might implement the same interaction. An “Edit profile” button could open a custom overlay with its own keyboard handlers, or a native dialog whose modal behavior is handled by the browser. Both might look convincing in a screenshot.&lt;/p&gt;

&lt;p&gt;The differences become more interesting when you press Tab, try to cancel an invalid form, or change your device’s color scheme.&lt;/p&gt;

&lt;p&gt;In this two-part series, we’ll use &lt;strong&gt;Modern Web Guidance&lt;/strong&gt; to build and inspect a small preferences page. We’ll follow the implementation choices, then test the resulting behavior. You’ll need basic HTML, CSS, and JavaScript knowledge; you don’t need a framework or previous experience with agent skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give the agent a place to check its approach
&lt;/h2&gt;

&lt;p&gt;An agent skill is a package of instructions and supporting resources that a compatible coding agent can load for a task. It helps shape how the agent works. It doesn’t become a dependency of the website you ship.&lt;/p&gt;

&lt;p&gt;Modern Web Guidance brings web-platform guidance into that workflow. When a task needs it, the skill directs the agent to search for relevant guides and retrieve their implementation patterns, caveats, and compatibility advice. The project started with Chrome and now also involves other browser teams. &lt;a href="https://developer.chrome.com/docs/modern-web-guidance" rel="noopener noreferrer"&gt;Modern Web Guidance documentation&lt;/a&gt; · &lt;a href="https://developer.chrome.com/blog/modern-web-guidance-v1" rel="noopener noreferrer"&gt;Version 1.0 announcement&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For our page, the useful questions are specific: how should a modal manage focus? How should a theme override interact with the operating system? What should happen when a form is invalid?&lt;/p&gt;

&lt;p&gt;The skill gives the agent material to consult for those questions. We still decide what the product should do and check whether the implementation does it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the demo
&lt;/h2&gt;

&lt;p&gt;The example is &lt;strong&gt;Common Ground&lt;/strong&gt; , a fictional application with one preferences page. You can edit a display name and bio, choose a theme, and save two notification preferences. Nothing is uploaded, and those notification settings don’t send emails.&lt;/p&gt;

&lt;p&gt;With Git, Node.js 26 or newer, and npm installed, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Puppo/modern-web-guidance-demos.git
&lt;span class="nb"&gt;cd&lt;/span&gt; modern-web-guidance-demos
git switch article-1/guided
npm ci
npm start

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;a href="http://127.0.0.1:4173/" rel="noopener noreferrer"&gt;the local demo&lt;/a&gt;. The page has no build step or browser runtime dependencies. The local server uses the pinned &lt;code&gt;http-server&lt;/code&gt; development dependency. The &lt;a href="https://github.com/Puppo/modern-web-guidance-demos/tree/5f1ed294a0bed52d5bcc1202e53511e9c4f6a0d0" rel="noopener noreferrer"&gt;source checkpoint for this article&lt;/a&gt; is preserved separately from the later refinements.&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%2Fghihu4h9d08knyuaqcjq.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%2Fghihu4h9d08knyuaqcjq.png" alt="Common Ground preferences page with profile editing, three theme options, and independent notification preferences" width="800" height="702"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Start with &lt;strong&gt;Edit profile&lt;/strong&gt;. Change the name, press Escape, and reopen the dialog. Your saved name should be restored. Later, we’ll connect that behavior to the native dialog and the application’s draft handling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install Modern Web Guidance for your own implementation
&lt;/h2&gt;

&lt;p&gt;If you want to build your own version, start from the empty starter in a separate checkout:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Puppo/modern-web-guidance-demos.git modern-web-guidance-exercise
&lt;span class="nb"&gt;cd&lt;/span&gt; modern-web-guidance-exercise
git switch experiment/starter
git switch -c my-preferences-demo

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the checkout in Google Antigravity and enable &lt;strong&gt;Modern Web Guidance&lt;/strong&gt; during setup. If Antigravity is already installed, open &lt;strong&gt;Settings → Customizations → Build with Google Plugins&lt;/strong&gt; and enable it there. The &lt;a href="https://developer.chrome.com/docs/modern-web-guidance/get-started" rel="noopener noreferrer"&gt;Chrome for Developers installation guide&lt;/a&gt; walks through both options. The completed demo runs without the skill installed.&lt;/p&gt;

&lt;p&gt;You can also inspect guidance directly. These are example commands using a query and guide ID consulted during the demo work:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx modern-web-guidance@latest search &lt;span class="s2"&gt;"build accessible modal dialog"&lt;/span&gt;
npx modern-web-guidance@latest retrieve &lt;span class="s2"&gt;"dialog"&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Search returns candidate guides. For the profile editor, &lt;code&gt;dialog&lt;/code&gt; is the match. The guide recommends opening a modal with the native &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt; element and &lt;code&gt;showModal()&lt;/code&gt; so the browser manages modal focus and makes the rest of the page inert. That gives the agent a specific implementation to try and gives you behavior to check.&lt;/p&gt;

&lt;p&gt;Try this prompt in Antigravity. It is adapted from the demo requirements:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Use Modern Web Guidance to build a standalone user preferences page with vanilla HTML, CSS, and JavaScript. Include a profile-editing dialog, system/light/dark themes, and two independent notification preferences. Keep profile edits separate from preference changes. Canceling or dismissing the dialog must discard its draft. Persist saved choices locally and explain when storage fails. Consult the relevant guides before implementing each part. Target Baseline Widely available features, with usable fallbacks for newer enhancements. For the profile editor, report the guide you retrieved, the recommendation you applied, and what you verified with the keyboard.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Keep the browser-support requirement explicit. A compatibility target helps the agent choose an approach, but it doesn’t prove that your page has been tested in those browsers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let the browser handle the modal
&lt;/h2&gt;

&lt;p&gt;The demo uses &lt;code&gt;&amp;lt;dialog&amp;gt;&lt;/code&gt; for profile editing. This excerpt keeps the naming relationship and opening call visible; the complete form and handlers are in the &lt;a href="https://github.com/Puppo/modern-web-guidance-demos/blob/df397ebe2f72fa280be743f4a9ece1fb0a5c5649/index.html" rel="noopener noreferrer"&gt;HTML&lt;/a&gt; and &lt;a href="https://github.com/Puppo/modern-web-guidance-demos/blob/df397ebe2f72fa280be743f4a9ece1fb0a5c5649/app.js" rel="noopener noreferrer"&gt;JavaScript&lt;/a&gt;.&lt;br&gt;
&lt;/p&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;dialog&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"profile-dialog"&lt;/span&gt;
  &lt;span class="na"&gt;aria-labelledby&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"dialog-title"&lt;/span&gt;
  &lt;span class="na"&gt;aria-describedby&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"dialog-help"&lt;/span&gt;
  &lt;span class="na"&gt;closedby&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"any"&lt;/span&gt;
&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;form&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"profile-form"&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"dialog"&lt;/span&gt; &lt;span class="na"&gt;aria-labelledby&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"dialog-title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h2&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"dialog-title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Edit your profile&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"dialog-help"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      Make it yours. Canceling or dismissing discards your edits.
    &lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
    &lt;span class="c"&gt;&amp;lt;!-- Profile fields and actions --&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/dialog&amp;gt;&lt;/span&gt;


const dialog = document.querySelector('#profile-dialog');
// After restoring the saved values into the form:
dialog.showModal();

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Opening it modally gives the browser responsibility for making the background inert and managing the modal focus behavior. The implementation doesn’t add a second focus trap, redundant dialog roles, or its own Escape handler.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;closedby="any"&lt;/code&gt; adds outside-click dismissal where supported. The demo retains Cancel and Escape when that enhancement is unavailable. This is a deliberate compatibility choice: outside-click dismissal is useful, but editing and cancellation must not depend on it.&lt;/p&gt;

&lt;p&gt;The browser doesn’t know our application’s save rules, though. Opening the dialog copies the saved profile into the fields. Saving applies the edited values. Canceling leaves the saved profile untouched, and reopening restores that saved version.&lt;/p&gt;

&lt;p&gt;Try the result with the keyboard. Tab to &lt;strong&gt;Edit profile&lt;/strong&gt; and press Enter. Focus should move to the display-name field. Press Tab and Shift+Tab to move through the dialog and check that the background controls stay out of reach. Change the name, press Escape, and confirm that focus returns to &lt;strong&gt;Edit profile&lt;/strong&gt;. Reopen the dialog to check that the unsaved name was discarded. The focus behavior comes from the native modal. Discarding the draft is an application rule.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the form controls recognizable
&lt;/h2&gt;

&lt;p&gt;The page uses radio buttons for the three mutually exclusive theme options and checkboxes for independent notification preferences. Styling changes their presentation while keeping the native controls in place.&lt;/p&gt;

&lt;p&gt;The profile form uses browser constraints too. Here is the display-name field, with its surrounding label and descriptions shortened:&lt;br&gt;
&lt;/p&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;label&lt;/span&gt; &lt;span class="na"&gt;for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"display-name"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Display name (required)&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"name-help"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Up to 60 characters.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"display-name"&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"displayName"&lt;/span&gt;
  &lt;span class="na"&gt;autocomplete&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"nickname"&lt;/span&gt;
  &lt;span class="na"&gt;required&lt;/span&gt;
  &lt;span class="na"&gt;maxlength&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"60"&lt;/span&gt;
  &lt;span class="na"&gt;pattern&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;".*\S.*"&lt;/span&gt;
  &lt;span class="na"&gt;aria-describedby&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"name-help name-error"&lt;/span&gt;
  &lt;span class="na"&gt;autofocus&lt;/span&gt;
&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"name-error"&lt;/span&gt; &lt;span class="na"&gt;aria-live&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"polite"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;required&lt;/code&gt; rejects an empty value. The pattern also requires a non-space character, so a name consisting only of spaces is rejected. The invalid handler supplies a visible explanation and focuses the field. While the user types, the input handler clears the existing error once the value becomes valid.&lt;/p&gt;

&lt;p&gt;Cancel has &lt;code&gt;formnovalidate&lt;/code&gt;. A user should be able to abandon an invalid draft without first fixing it. Try submitting a blank name, then canceling: the dialog should close and the previous profile should remain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make theme selection include the browser’s controls
&lt;/h2&gt;

&lt;p&gt;A dark page with bright native inputs is an easy detail to miss. The theme implementation therefore updates the page’s color scheme as well as its own color tokens.&lt;/p&gt;

&lt;p&gt;The theme guides led us to declare support for both color schemes and apply the selected scheme to the root element. This lets native controls follow the same choice as the page colors. The &lt;a href="https://github.com/Puppo/modern-web-guidance-demos/blob/df397ebe2f72fa280be743f4a9ece1fb0a5c5649/styles.css" rel="noopener noreferrer"&gt;stylesheet&lt;/a&gt; includes the override selectors, &lt;code&gt;light-dark()&lt;/code&gt; tokens, and fallback colors.&lt;/p&gt;

&lt;p&gt;System mode stores no explicit theme override. If you save Dark, that choice remains Dark even when the OS changes. If you save System, the page follows the OS again. A small guarded script restores a saved override before the page finishes loading; blocked storage leaves the system default available.&lt;/p&gt;

&lt;p&gt;The palette, spacing, and visual identity are choices made for this demo. They aren’t evidence that the skill automatically supplies a good design for every product.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the result honest
&lt;/h2&gt;

&lt;p&gt;This implementation was developed with the skill available and with the project requirements already discussed. It is a practical walkthrough, not a controlled comparison with an otherwise identical agent run without the skill.&lt;/p&gt;

&lt;p&gt;The source includes &lt;a href="https://github.com/Puppo/modern-web-guidance-demos/blob/df397ebe2f72fa280be743f4a9ece1fb0a5c5649/verification/README.md" rel="noopener noreferrer"&gt;verification notes&lt;/a&gt;. Initial browser checks covered editing, cancellation, persistence, validation, theme changes, and storage failures. Those checks also led to corrections recorded alongside the code.&lt;/p&gt;

&lt;p&gt;For your own exercise, review the choices the agent made. Can you explain the dialog’s dismissal behavior? Can you find where a preview becomes a saved preference? Does an error message describe what actually happened?&lt;/p&gt;

&lt;p&gt;In part two, we’ll use Modern Web Guidance to scan an existing form for legacy patterns, evaluate the findings, and modernize textarea sizing and validation feedback.&lt;/p&gt;

&lt;p&gt;See you soon!&lt;/p&gt;

</description>
      <category>web</category>
      <category>ai</category>
      <category>a11y</category>
    </item>
    <item>
      <title>WebMCP in Practice - Find the Right Task and Update It</title>
      <dc:creator>Luca Del Puppo</dc:creator>
      <pubDate>Thu, 19 Nov 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/webmcp-in-practice-find-the-right-task-and-update-it-4441</link>
      <guid>https://dev.to/playfulprogramming/webmcp-in-practice-find-the-right-task-and-update-it-4441</guid>
      <description>&lt;p&gt;In the demo, I ask the agent to move “Write release notes.” There are two cards called &lt;strong&gt;Write release notes&lt;/strong&gt; on the DevDesk board. The one we want is &lt;code&gt;DD-104&lt;/code&gt;. The other is &lt;code&gt;DD-101&lt;/code&gt; and belongs to DevDesk. If we offer an action that takes a title and picks the first match, we’ve already made the wrong choice before the agent gets a say.&lt;/p&gt;

&lt;p&gt;In Part 02, we gave the agent a way to prepare a task in the existing HTML form. This time, we’ll register two JavaScript tools. One reads the board and returns matching tasks. The other updates a task whose ID the caller already knows. &lt;a href="https://blog.delpuppo.net/webmcp-in-practice/webmcp-declarative-forms/" rel="noopener noreferrer"&gt;Part 02 — Turn an HTML Form into an Agent Tool&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Run DevDesk
&lt;/h2&gt;

&lt;p&gt;Use Node.js 26 or later and check out the branch for this chapter. If you already cloned the repository, fetch the branch and switch to it. &lt;a href="https://github.com/Puppo/webmcp-in-practice/tree/part-03-imperative-tools" rel="noopener noreferrer"&gt;Part 03 demo&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Puppo/webmcp-in-practice.git
&lt;span class="nb"&gt;cd&lt;/span&gt; webmcp-in-practice
git checkout part-03-imperative-tools
npm ci
npm run dev

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the URL printed by Vite. The board’s manual controls work in a modern browser. For native tool discovery and invocation, follow Chrome’s current setup instructions and check that your browser or inspector can see both imperative tools. Confirm &lt;strong&gt;Reset example board&lt;/strong&gt; if you’ve used another chapter on the same local origin and want to restore the fixtures. &lt;a href="https://developer.chrome.com/docs/ai/webmcp/imperative-api" rel="noopener noreferrer"&gt;Chrome’s imperative WebMCP guide&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Find first, then change
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;list_tasks&lt;/code&gt; accepts three optional filters. &lt;code&gt;project&lt;/code&gt; matches the whole project name ignoring case, &lt;code&gt;query&lt;/code&gt; matches part of the title ignoring case, and &lt;code&gt;status&lt;/code&gt; matches a board status. With no filters it returns the current board. Matching tasks include their IDs alongside the project and title. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-03-imperative-tools/src/webmcp.ts" rel="noopener noreferrer"&gt;Tool definitions&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Start with this input to &lt;code&gt;list_tasks&lt;/code&gt;:&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="nl"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Write release notes"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a reset board you’ll get both release-notes tasks. If that’s all the user told you, ask which project they mean. If they said Design System, include that project in the query or use it to select the matching result. Once you have the ID, pass it to &lt;code&gt;set_task_status&lt;/code&gt;:&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="nl"&gt;"taskId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"DD-104"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"done"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keeping lookup separate gives an agent a way to inspect the board before committing to an update. It also lets someone ask what’s still in progress without touching any tasks. The ID makes the update precise once the target is known. The user’s words and the lookup results still determine which target to choose.&lt;/p&gt;

&lt;h2&gt;
  
  
  Register the update
&lt;/h2&gt;

&lt;p&gt;The tool definition describes its inputs and implements what happens when it’s called. Here’s the &lt;code&gt;set_task_status&lt;/code&gt; entry from the demo’s tool array. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-03-imperative-tools/src/webmcp.ts" rel="noopener noreferrer"&gt;Source&lt;/a&gt;&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="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'set_task_status'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="s1"&gt;'Update a known task by its ID. Find the task first if its identity is unclear.'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;inputSchema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'object'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;properties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;taskId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'string'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'The unique task ID.'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'string'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="kd"&gt;enum&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;statuses&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;required&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'taskId'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'status'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;additionalProperties&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;annotations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;untrustedContentHint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;taskId&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="s1"&gt;'string'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;output&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Provide a task ID.'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;setTaskStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="n"&gt;board&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTasks&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;taskId&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;output&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;board&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sb"&gt;`Updated ${result.task.title}.`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;output&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The schema exposes the required arguments and supported status values. The callback checks the ID type at runtime, and &lt;code&gt;setTaskStatus&lt;/code&gt; checks the status and whether the ID exists. &lt;code&gt;output&lt;/code&gt; wraps the result as a text content item containing JSON. At this checkpoint, a successful response returns the updated task. The page can warn when storage fails, but the tool response gives the caller no storage status yet.&lt;/p&gt;

&lt;p&gt;The page passes &lt;code&gt;document.modelContext&lt;/code&gt; to the registration function. When the interface is present, the demo registers each tool with an abort signal, logs a registration rejection unless cleanup is underway, and aborts the signal when Vite disposes the module during a development update. A page that re-registers tools as its views change can use the same signal pattern to retire old definitions. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-03-imperative-tools/src/main.ts" rel="noopener noreferrer"&gt;Page setup&lt;/a&gt; · &lt;a href="https://webmachinelearning.github.io/webmcp/" rel="noopener noreferrer"&gt;WebMCP draft&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Use the same board from both entry points
&lt;/h2&gt;

&lt;p&gt;The callback calls &lt;code&gt;board.getTasks()&lt;/code&gt; at invocation time. If you change a card by hand after the tools register, the next tool call sees the current tasks. Both the dropdown and the tool call &lt;code&gt;setTaskStatus&lt;/code&gt;. A successful update goes through the same page function, which updates the in-memory board, attempts to save it, and redraws the cards. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-03-imperative-tools/src/state.ts" rel="noopener noreferrer"&gt;Board state&lt;/a&gt; · &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-03-imperative-tools/src/main.ts" rel="noopener noreferrer"&gt;Page setup&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/_TacFe54gP8" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The video starts with a request that leaves the project and destination open:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Move the Write release notes&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent finds two cards with that title, one in &lt;strong&gt;DevDesk&lt;/strong&gt; and one in &lt;strong&gt;Design System&lt;/strong&gt; , and asks which one I want to move. I reply with the project and destination:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The design one to the Done column&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here, “the design one” refers to the &lt;strong&gt;Design System&lt;/strong&gt; card. The follow-up gives the agent enough information to move that card to &lt;strong&gt;Done&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To check the underlying tool behavior yourself, try the two calls above and list the release-notes tasks again. On a fresh board, &lt;code&gt;DD-104&lt;/code&gt; should be in &lt;strong&gt;Done&lt;/strong&gt; and &lt;code&gt;DD-101&lt;/code&gt; should still be in &lt;strong&gt;To do&lt;/strong&gt;. Change &lt;code&gt;DD-104&lt;/code&gt; by hand and list again to check that the tool reads the updated board. The automated tests exercise these handlers with a mocked model context. The video shows one run of the clarification flow. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-03-imperative-tools/src/webmcp.test.ts" rel="noopener noreferrer"&gt;Tool tests&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffz034s0unomtl6mgv212.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffz034s0unomtl6mgv212.webp" alt="DD-104 in Done and DD-101 still in To do" width="799" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The expected board after updating DD-104. The screenshot uses the demo’s tool handler with mocked registration.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Next, we’ll see what happens when a valid ID goes stale between the two calls.&lt;/p&gt;

</description>
      <category>webmcp</category>
      <category>ai</category>
      <category>typescript</category>
    </item>
    <item>
      <title>WebMCP in Practice - Turn an HTML Form into an Agent Tool</title>
      <dc:creator>Luca Del Puppo</dc:creator>
      <pubDate>Mon, 16 Nov 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/webmcp-in-practice-turn-an-html-form-into-an-agent-tool-38ja</link>
      <guid>https://dev.to/playfulprogramming/webmcp-in-practice-turn-an-html-form-into-an-agent-tool-38ja</guid>
      <description>&lt;p&gt;In &lt;a href="https://blog.delpuppo.net/webmcp-in-practice/webmcp-in-practice-introduction/" rel="noopener noreferrer"&gt;Part 01&lt;/a&gt;, we built DevDesk, a small task board. Today, let's give an agent a way to prepare a task using the form already on the page.&lt;/p&gt;

&lt;p&gt;In the demo, I tell the agent I need to review the DevDesk changelog ASAP. The agent can turn that request into a task title, a project, and a priority. You get to check those fields, edit anything that looks wrong, and decide whether to submit.&lt;/p&gt;

&lt;p&gt;We'll use Chrome's &lt;strong&gt;experimental declarative WebMCP API&lt;/strong&gt;. It adds annotations to HTML forms so a supporting browser can expose them as tools. This form API is being explored separately from the &lt;a href="https://webmachinelearning.github.io/webmcp/" rel="noopener noreferrer"&gt;WebMCP Community Group's imperative API draft&lt;/a&gt;; details and browser support can change. See &lt;a href="https://developer.chrome.com/docs/ai/webmcp/declarative-api" rel="noopener noreferrer"&gt;Chrome's declarative API guide&lt;/a&gt; for the current behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run this chapter
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://github.com/Puppo/webmcp-in-practice/tree/part-02-declarative-form" rel="noopener noreferrer"&gt;Part 02 demo branch&lt;/a&gt; contains the complete example. With Node.js 26 or later installed, check out that branch and start DevDesk.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Puppo/webmcp-in-practice.git
&lt;span class="nb"&gt;cd&lt;/span&gt; webmcp-in-practice
git checkout part-02-declarative-form
npm ci
npm run dev

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the URL printed by Vite. The form works by hand in an ordinary browser: enter a title and project, select a priority, and click &lt;strong&gt;Add task&lt;/strong&gt;. To try the agent flow, use a browser and agent setup that supports the experimental declarative API; check Chrome's current documentation for its availability and setup. Inspect the tools actually available to the agent and look for &lt;code&gt;create_task&lt;/code&gt;. The presence of a model context API alone doesn't prove this form was registered or that declarative forms are supported.&lt;/p&gt;

&lt;h2&gt;
  
  
  Describe the form as a tool
&lt;/h2&gt;

&lt;p&gt;Here's the &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-02-declarative-form/index.html" rel="noopener noreferrer"&gt;form from the demo&lt;/a&gt;:&lt;br&gt;
&lt;/p&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;form&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"task-form"&lt;/span&gt;
  &lt;span class="na"&gt;toolname&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"create_task"&lt;/span&gt;
  &lt;span class="na"&gt;tooldescription&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Prepare a task for review and creation. Use when the user wants to add a task."&lt;/span&gt;
&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"task-title"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Title
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt;
      &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"task-title"&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"title"&lt;/span&gt;
      &lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"e.g. Review the changelog"&lt;/span&gt;
      &lt;span class="na"&gt;required&lt;/span&gt;
    &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"task-project"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Project
    &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"task-project"&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"project"&lt;/span&gt; &lt;span class="na"&gt;placeholder&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"e.g. DevDesk"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"task-priority"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Priority
    &lt;span class="nt"&gt;&amp;lt;select&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"task-priority"&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"priority"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"low"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Low&lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"medium"&lt;/span&gt; &lt;span class="na"&gt;selected&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Medium&lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;option&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"high"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;High&lt;span class="nt"&gt;&amp;lt;/option&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/select&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"primary-button"&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;aria-hidden&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;+&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt; Add task
  &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;toolname&lt;/code&gt; gives the action a stable name, and &lt;code&gt;tooldescription&lt;/code&gt; explains when to use it. The controls' &lt;code&gt;name&lt;/code&gt; attributes identify the inputs: &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;project&lt;/code&gt;, and &lt;code&gt;priority&lt;/code&gt;. Their labels describe the fields, &lt;code&gt;required&lt;/code&gt; marks title and project as required, and the select provides the allowed priority choices, with medium selected initially. Chrome also supports &lt;code&gt;toolparamdescription&lt;/code&gt; when a field needs a more explicit description; this demo uses its labels.&lt;/p&gt;

&lt;p&gt;Notice what's missing: &lt;code&gt;toolautosubmit&lt;/code&gt;. In the documented flow, the browser can fill and focus the form, but the person must submit it. Review the values, change them if needed, and choose &lt;strong&gt;Add task&lt;/strong&gt; when ready. You can also cancel the agent operation instead of submitting. Until submission, the form is a proposal, not a new task.&lt;/p&gt;

&lt;p&gt;The form itself declares &lt;code&gt;create_task&lt;/code&gt;. We don't also register an imperative tool with the same name: one action has one entry point here. The existing submit handler still owns the application behavior.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr0v6f06iwid01ec52pmh.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr0v6f06iwid01ec52pmh.webp" alt="DevDesk form filled with Review the changelog, DevDesk, and High priority" width="617" height="254"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The form with example values before submission. These values were entered manually to illustrate what you would review.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the existing submit path
&lt;/h2&gt;

&lt;p&gt;The handler reads the form and passes its values to the same &lt;code&gt;createTask&lt;/code&gt; operation used by the app. This is the actual &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-02-declarative-form/src/main.ts" rel="noopener noreferrer"&gt;submit handler&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'submit'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;preventDefault&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;FormData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createTask&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'title'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'project'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;priority&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'priority'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sb"&gt;`DD-${crypto.randomUUID()}`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;agentInvoked&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;respondWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;formError&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;
    &lt;span class="n"&gt;formError&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;hidden&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nf"&gt;clearFormError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="nf"&gt;updateBoard&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sb"&gt;`Added ${result.task.title} to To do.`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;titleInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;focus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;agentInvoked&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;respondWith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`Created ${result.task.id}: ${result.task.title}.`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;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;&lt;code&gt;preventDefault()&lt;/code&gt; stops the normal navigation. The task operation validates the values and returns either an error or the updated task list. On success, the page resets the form and updates the board. On failure, it displays the validation message.&lt;/p&gt;

&lt;p&gt;For a submission reported as agent-invoked, the handler also calls &lt;code&gt;respondWith()&lt;/code&gt; with a promise containing a message for the agent. Both success and validation failure are plain strings in this example; the error isn't a structured error response. Also, the success message says the task was created, not that it was durably saved. If browser storage fails, DevDesk keeps the change in memory and shows a warning, but the task may disappear on reload. We'll give agent outcomes more structure in a later chapter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try the review step
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/zbHQTLmDbr0" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it with Chrome’s WebMCP extension
&lt;/h3&gt;

&lt;p&gt;You can use the example WebMCP extension from GoogleChromeLabs as your agent. The extension requires Node.js 22.18 or later and Chrome 155 or later with &lt;code&gt;chrome://flags/#enable-webmcp-testing&lt;/code&gt; enabled. In the extension checkout, copy &lt;code&gt;.env.example&lt;/code&gt; to &lt;code&gt;.env&lt;/code&gt;, choose a &lt;code&gt;MODEL&lt;/code&gt; and set its provider key. Run &lt;code&gt;npm install&lt;/code&gt; and &lt;code&gt;npm run server&lt;/code&gt;, then run &lt;code&gt;npm run build&lt;/code&gt; in another terminal. Open &lt;code&gt;chrome://extensions&lt;/code&gt;, enable &lt;strong&gt;Developer mode&lt;/strong&gt; , and use &lt;strong&gt;Load unpacked&lt;/strong&gt; to select the extension’s &lt;code&gt;dist/&lt;/code&gt; directory. &lt;a href="https://github.com/GoogleChromeLabs/webmcp-extension#get-started" rel="noopener noreferrer"&gt;Extension setup&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open the extension’s side panel on the running DevDesk tab and look for &lt;code&gt;create_task&lt;/code&gt; in the tools list. Then try the prompt from the video:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I have to review the changelog of the DevDesk project ASAP.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If the extension asks for permission, allow the tool call. That lets the agent fill the form. You still decide whether to submit it on the page. Check the proposed title and confirm that the project is &lt;code&gt;DevDesk&lt;/code&gt; and the priority is &lt;code&gt;high&lt;/code&gt;. Edit a value before submitting, then confirm the task that appears on the board reflects your final choice. Try another request and cancel it: no new task should be created from that cancelled operation.&lt;/p&gt;

&lt;p&gt;You can still test creation and validation manually when the experimental tool isn't available. The demo’s automated tests cover the application code. Use the side-panel exercise to check tool discovery and the review step in your browser.&lt;/p&gt;

&lt;p&gt;Next, we'll use imperative tools to list tasks and change a task's status by ID. For now, one ordinary form gives us a useful boundary: the agent prepares the details, and you decide when to create the task.&lt;/p&gt;

</description>
      <category>webmcp</category>
      <category>ai</category>
      <category>typescript</category>
    </item>
    <item>
      <title>WebMCP in Practice — Give AI Agents a Clear Way into Your App</title>
      <dc:creator>Luca Del Puppo</dc:creator>
      <pubDate>Thu, 12 Nov 2026 00:00:00 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/webmcp-in-practice-give-ai-agents-a-clear-way-into-your-app-3m40</link>
      <guid>https://dev.to/playfulprogramming/webmcp-in-practice-give-ai-agents-a-clear-way-into-your-app-3m40</guid>
      <description>&lt;p&gt;Imagine asking a browser agent to mark “Write release notes” as done. On the DevDesk board, there are two cards with that title. One belongs to DevDesk and the other to Design System. If you mean the Design System task and the agent picks the first match, congratulations to the DevDesk release notes on their early retirement. 😅&lt;/p&gt;

&lt;p&gt;A person can read the project on each card and choose the right one. An agent can also inspect the page, match the project and title, then operate that card’s dropdown. But the application already knows each task’s identity. The Design System card is &lt;code&gt;DD-104&lt;/code&gt;, and moving it to Done is an operation we can give a name and a clear set of inputs.&lt;/p&gt;

&lt;p&gt;That’s the idea behind &lt;strong&gt;WebMCP in Practice&lt;/strong&gt; , a six-part series that starts with an HTML form and ends with an agent workflow we can test. We’ll use the same little task board throughout.&lt;/p&gt;

&lt;h2&gt;
  
  
  What WebMCP gives the agent
&lt;/h2&gt;

&lt;p&gt;WebMCP is a browser API proposal for exposing page actions as structured tools. A tool can describe what it does, declare its inputs, and run application code when an agent invokes it. For DevDesk, a future &lt;code&gt;list_tasks&lt;/code&gt; tool could give the agent task IDs and projects. The agent could then ask &lt;code&gt;set_task_status&lt;/code&gt; to move &lt;code&gt;DD-104&lt;/code&gt; to &lt;code&gt;done&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When an agent works from the DOM or screenshots, it has to find the right card and infer which control performs the action. With a tool, the agent still has to resolve what the user meant, but the app can provide the task data and an explicit way to update the chosen task. If the user gives only the shared title, the agent has a reason to ask which project they mean.&lt;/p&gt;

&lt;p&gt;The WebMCP Community Group draft puts the imperative JavaScript API on &lt;code&gt;document.modelContext&lt;/code&gt;. Chrome also documents an experimental declarative API for turning HTML forms into tools through annotations. That form API is being explored separately from the imperative draft. &lt;a href="https://webmachinelearning.github.io/webmcp/" rel="noopener noreferrer"&gt;WebMCP Community Group draft&lt;/a&gt; · &lt;a href="https://developer.chrome.com/docs/ai/webmcp/declarative-api" rel="noopener noreferrer"&gt;Chrome’s declarative API guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The “MCP” in the name points to a familiar idea. A client discovers tools and calls them with structured arguments. With the Model Context Protocol, an MCP client connects to a server that provides capabilities. With WebMCP, a web page offers actions that run in the context of that page, where the app can use its current state. &lt;a href="https://developer.chrome.com/docs/ai/webmcp/compare-mcp" rel="noopener noreferrer"&gt;Chrome’s comparison of WebMCP and MCP&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Run DevDesk
&lt;/h2&gt;

&lt;p&gt;Part 01 is the browser app we’ll extend. It uses HTML, TypeScript, Vite, and &lt;code&gt;localStorage&lt;/code&gt;. You can run this chapter in a modern browser with the default settings. The first tool arrives in Part 02.&lt;/p&gt;

&lt;p&gt;With Node.js 26 or later installed, run these commands. The checkout selects the demo branch for this chapter. &lt;a href="https://github.com/Puppo/webmcp-in-practice/tree/part-01-devdesk" rel="noopener noreferrer"&gt;DevDesk Part 01 source&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/Puppo/webmcp-in-practice.git
&lt;span class="nb"&gt;cd&lt;/span&gt; webmcp-in-practice
git checkout part-01-devdesk
npm ci
npm run dev

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the URL Vite prints and try the board.&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%2Fzf4cbepdohrvozhtwwz7.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%2Fzf4cbepdohrvozhtwwz7.png" alt=" " width="799" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The example board has two cards titled “Write release notes,” one for DevDesk and one for Design System.&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Enter a title and a project, choose a priority, then select &lt;strong&gt;Add task&lt;/strong&gt;. Your task appears in &lt;strong&gt;To do&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Find &lt;code&gt;DD-104&lt;/code&gt;, the &lt;strong&gt;Write release notes&lt;/strong&gt; card in &lt;strong&gt;Design System&lt;/strong&gt; , and change its status to &lt;strong&gt;Done&lt;/strong&gt;. The DevDesk card with the same title stays in &lt;strong&gt;To do&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Reload the page to check that your new task and the status change survived.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Reset example board&lt;/strong&gt; and confirm to replace your local changes with the original six tasks.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;DevDesk saves the board for the current browser origin. There’s no backend or cross-tab sync, so the last tab to save wins. If the browser blocks storage, you can keep using the board and a warning tells you that your edits may be lost on reload.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give each action one place to live
&lt;/h2&gt;

&lt;p&gt;The status dropdown hands the selected card’s ID and new status to a TypeScript function. That function receives the current tasks and returns the result. The page code then saves the returned tasks and redraws the board. &lt;a href="https://github.com/Puppo/webmcp-in-practice/blob/part-01-devdesk/src/tasks.ts" rel="noopener noreferrer"&gt;Source for the task operations&lt;/a&gt;&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="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;setTaskStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;readonly&lt;/span&gt; &lt;span class="nc"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;unknown&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;TaskResult&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nf"&gt;isStatus&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Choose a valid status.'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Task not found.'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;current&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&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;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;tasks&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;task&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;&lt;code&gt;isStatus&lt;/code&gt; checks the incoming value at runtime. The function looks up the task by ID, so duplicate titles are fine. An invalid status or an unknown ID returns an error without changing the board. If the task is already in the requested status, repeating the operation succeeds and returns the original tasks.&lt;/p&gt;

&lt;p&gt;The task rules sit in this function, away from the dropdown and storage. When we add the agent tool, it can call the same operation as the dropdown. The board will have one definition of what it means to move a task and what happens when the request can’t be applied.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where we’re going
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The baseline.&lt;/strong&gt; Run DevDesk and make sure the board works by hand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The declarative form.&lt;/strong&gt; Annotate the create-task form so an agent can use it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Imperative tools.&lt;/strong&gt; Add &lt;code&gt;list_tasks&lt;/code&gt; and &lt;code&gt;set_task_status&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State and errors.&lt;/strong&gt; Give the agent clear outcomes when a request succeeds or fails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evals.&lt;/strong&gt; Check whether an agent’s workflow produces the expected board state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chrome agent skills.&lt;/strong&gt; Use Chrome’s guidance to build and verify a workflow for archiving completed tasks.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Next, we’ll start with the form you used to add a task and give the browser enough information to offer it as a tool.&lt;/p&gt;

</description>
      <category>webmcp</category>
      <category>ai</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Automating my Codemotion Badge with Antigravity</title>
      <dc:creator>Luca Del Puppo</dc:creator>
      <pubDate>Wed, 08 Jul 2026 05:50:52 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/automating-my-codemotion-badge-with-antigravity-4gpo</link>
      <guid>https://dev.to/playfulprogramming/automating-my-codemotion-badge-with-antigravity-4gpo</guid>
      <description>&lt;p&gt;Today, I wanna show you how to set up your devices with Antigravity using only the agentic mode, without touching any code.&lt;/p&gt;

&lt;p&gt;At the last CodeMotion Rome, I got my special badge. A &lt;a href="https://www.cmnode.it/en/" rel="noopener noreferrer"&gt;CM Node&lt;/a&gt;, a special hardware board, that you can customise for your conferences.&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%2Fm6q63fq326znwdh88mvn.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%2Fm6q63fq326znwdh88mvn.png" width="800" height="584"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm not a super nerd for this kind of stuff, so I decided to use Antigravity and all its capabilities to build and flash the best board ever for my future conferences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Small intro about the board
&lt;/h2&gt;

&lt;p&gt;This board has been delivered with a &lt;a href="https://github.com/Codemotion-Official/CMNode" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt; to understand how to flash it and how it works. In Rome, I saw different attendees with awesome badges. For instance, Soumaya had built a badge with a small plastic hand that used a sensor when someone was near her; it started waving to say hi.&lt;br&gt;&lt;br&gt;
Since that day, I have been thinking about what I can build to have a cool badge. Nothing has come to my mind, so today, with this blog, we will build my badge together, and thanks to Antigravity, we will create the best version possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Antigravity
&lt;/h2&gt;

&lt;p&gt;If you don't know &lt;a href="https://antigravity.google/" rel="noopener noreferrer"&gt;Antigravity&lt;/a&gt;. Antigravity is a set of tools built by Google. We have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://antigravity.google/product/antigravity-2" rel="noopener noreferrer"&gt;Antigravity 2.0&lt;/a&gt;: is a dedicated platform to work with agents. Orchestrate multiple autonomous agents working in parallel across independent projects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://antigravity.google/product/antigravity-cli" rel="noopener noreferrer"&gt;Antigravity CLI&lt;/a&gt;: terminal-first surface to interact with Antigravity agents. Stay in your flow without context switching&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://antigravity.google/product/antigravity-ide" rel="noopener noreferrer"&gt;Antigravity IDE&lt;/a&gt;: editor view offers tab autocompletion, natural language code commands, and a configurable, and context-aware configurable agent&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://antigravity.google/product/antigravity-sdk" rel="noopener noreferrer"&gt;Antigravity SDK&lt;/a&gt;: build AI agents that autonomously read files, run commands, edit code, and more. The Agent SDK gives you the same tools, agent loop, and context management that power Google Antigravity, programmable in Python.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Today, in this blog post, we will use Antigravity 2.0 to set up the board. You can use this tool to orchestrate many projects from a unique UI. This tool is fully agentic; using natural language, you can spawn agents, plan, and work on your projects. If you want to check the codebase in detail, you must use the Antigravity IDE. I’m not a fan of this decision, I’d prefer one tool for both, but this is what we have, and we must use it as it is.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let’s start cooking
&lt;/h3&gt;

&lt;p&gt;Okay, after this introduction, let’s see what we can do with Antigravity and the CodeMotion Board.&lt;/p&gt;

&lt;p&gt;So, I’m dumb about this board right now, and I want to use Antigravity to figure out what I can do with it and get an idea of what my badge might look like.&lt;/p&gt;

&lt;p&gt;I open the Antigravity app, and from the UI, I start a new project, and in the prompt, I type&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I want to set up my Codemotion Badge.&lt;br&gt;&lt;br&gt;
It's a CMNode v0 &lt;a href="https://www.cmnode.it/en/" rel="noopener noreferrer"&gt;https://www.cmnode.it/en/&lt;/a&gt;, and it can be programmed.&lt;br&gt;&lt;br&gt;
I want to create two different screens: the first a classic one with name, surname, heading, and company, and a QR code linking to my website.&lt;br&gt;&lt;br&gt;
The second one must be fantastic, and I want different options to choose from you.&lt;/p&gt;

&lt;p&gt;I have this repository as an example to set up the badge &lt;a href="https://github.com/Codemotion-Official/CMNode" rel="noopener noreferrer"&gt;https://github.com/Codemotion-Official/CMNode&lt;/a&gt;; you can use it as an example to create my badge.&lt;br&gt;&lt;br&gt;
Lastly, I don't want to flash the ROM every time, so I'd like a small web page I can access via Wi-Fi to update the information.&lt;/p&gt;

&lt;p&gt;Can you plan the work to do it?&lt;br&gt;&lt;br&gt;
Include also two or three possible ideas for the second screen. It must be cool and fancy!&lt;/p&gt;

&lt;p&gt;The badge is already connected to the laptop in case you want to deploy the result.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, I press enter and let’s see the result and what it will cook.&lt;/p&gt;

&lt;p&gt;The result&lt;/p&gt;

&lt;blockquote&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;CMNode v0 WiFi Configuration &amp;amp; Dual Screen Setup&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The goal of this task is to upgrade your CMNode v0 badge by replacing the serial-based configuration with a Wi-Fi-based web interface. We will also save the configured data to flash memory so it persists across reboots, and implement two different display layouts: a "Classic" screen and a "Fantastic" screen.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;User Review Required&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;IMPORTANT&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Please review the proposed ideas for the "Fantastic" screen below. Let me know which one you prefer, or if you'd like to combine elements from different ideas!&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Ideas for the "Fantastic" Second Screen:&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The "Hacker Terminal"&lt;/strong&gt; : A retro command-line interface aesthetic. The screen features a black background with white text, simulating a terminal session (e.g., &lt;code&gt;&amp;gt; user@cmnode:~$ whoami&lt;/code&gt;, followed by your details). We can use monospace fonts and add some faux hex-dumps or ASCII elements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The "RPG Stats / Gamer Card"&lt;/strong&gt; : Your badge becomes a character stat sheet. It will display you as a "Level 99 Developer" with stats like "INT: 99", "COFFEE: 100%", an energy bar, and your details integrated into a game-like UI.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The "Minimalist Cyberpunk"&lt;/strong&gt; : A bold, modern, and high-contrast design. It uses large vertical typography for your name, heavy geometric shapes, thick red accent lines, and a large barcode aesthetic alongside your QR code.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Let me know which of these three ideas (or a mix!) you want me to build for the second screen.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Proposed Changes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We will modify the firmware to support a captive-like Wi-Fi Access Point and Web Server.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Core Logic Updates&lt;/strong&gt;
&lt;/h3&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;[MODIFY]&lt;/strong&gt; &lt;code&gt;src/main.cpp&lt;/code&gt; &lt;strong&gt;(or&lt;/strong&gt; &lt;code&gt;NodeV0.ino&lt;/code&gt;&lt;strong&gt;)&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Wi-Fi Access Point&lt;/strong&gt; : The ESP32-C3 will broadcast an SSID (e.g., &lt;code&gt;CMNode-Config&lt;/code&gt;). You can connect to it with your phone or laptop.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Web Server&lt;/strong&gt; : A built-in web server will serve a simple, mobile-friendly HTML configuration page at &lt;a href="http://192.168.4.1" rel="noopener noreferrer"&gt;&lt;code&gt;http://192.168.4.1&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Form Submission&lt;/strong&gt; : The webpage will contain a form to update your Name, Surname, Role, Company, QR Link, and a dropdown to select the active screen layout (Classic vs Fantastic).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Persistent Storage&lt;/strong&gt; : Integrate the &lt;code&gt;Preferences&lt;/code&gt; library to save your data to the ESP32's non-volatile storage (NVS). This ensures your badge remembers your details even after turning off.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Display Pipeline&lt;/strong&gt; : Refactor the &lt;code&gt;drawContent()&lt;/code&gt; function to support rendering two completely different layouts based on your selection.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Verification Plan&lt;/strong&gt;
&lt;/h2&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Manual Verification&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I will write the updated code and you will flash it to your badge via PlatformIO or Arduino IDE.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We will verify that the badge broadcasts the &lt;code&gt;CMNode-Config&lt;/code&gt; Wi-Fi network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We will connect to it, open the web page, submit new data, and verify that the E-paper display updates immediately.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We will reboot the badge to confirm the data is preserved.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We will toggle between the Classic and Fantastic screens to verify the layouts.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;I commented on the plan, deciding to go with option one and asked for an example design.&lt;br&gt;&lt;br&gt;
Antigravity has started reviewing the plan and updated it in this way&lt;/p&gt;

&lt;blockquote&gt;
&lt;h1&gt;
  
  
  &lt;strong&gt;CMNode v0 WiFi Configuration &amp;amp; Dual Screen Setup&lt;/strong&gt;
&lt;/h1&gt;

&lt;p&gt;The goal of this task is to upgrade your CMNode v0 badge by replacing the serial-based configuration with a Wi-Fi-based web interface. We will also save the configured data to flash memory so it persists across reboots, and implement two different display layouts: a "Classic" screen and a "Fantastic" screen.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Design Choice: "Hacker Terminal"&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;You've selected the &lt;strong&gt;Hacker Terminal&lt;/strong&gt; idea for the second screen. This layout will simulate a retro command-line interface on the E-ink display:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt; : Black (inverted).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Text&lt;/strong&gt; : Monospace white font, simulating terminal output (&lt;code&gt;root@cmnode:~$ whoami&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data&lt;/strong&gt; : Your name, surname, role, and company will be displayed as the "output" of the terminal command.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accents&lt;/strong&gt; : Faux hex-dumps or system logs on the side, and a right-aligned QR code.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is a mockup of the design:&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%2Fvlr4ibd3u9ajetq95uiy.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%2Fvlr4ibd3u9ajetq95uiy.png" alt="Hacker Terminal Mockup" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Does this mockup and the updated plan look good to you? If so, I will proceed with the implementation!&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Proposed Changes&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;We will modify the firmware to support a captive-like Wi-Fi Access Point and Web Server.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Core Logic Updates&lt;/strong&gt;
&lt;/h3&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;[MODIFY]&lt;/strong&gt; &lt;code&gt;src/main.cpp&lt;/code&gt; &lt;strong&gt;(or&lt;/strong&gt; &lt;code&gt;NodeV0.ino&lt;/code&gt;&lt;strong&gt;)&lt;/strong&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Wi-Fi Access Point&lt;/strong&gt; : The ESP32-C3 will broadcast an SSID (e.g., &lt;code&gt;CMNode-Config&lt;/code&gt;). You can connect to it with your phone or laptop.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Web Server&lt;/strong&gt; : A built-in web server will serve a simple, mobile-friendly HTML configuration page at &lt;a href="http://192.168.4.1" rel="noopener noreferrer"&gt;&lt;code&gt;http://192.168.4.1&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Form Submission&lt;/strong&gt; : The webpage will contain a form to update your Name, Surname, Role, Company, QR Link, and a dropdown to select the active screen layout (Classic vs Fantastic).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Persistent Storage&lt;/strong&gt; : Integrate the &lt;code&gt;Preferences&lt;/code&gt; library to save your data to the ESP32's non-volatile storage (NVS). This ensures your badge remembers your details even after turning off.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Display Pipeline&lt;/strong&gt; : Refactor the &lt;code&gt;drawContent()&lt;/code&gt; function to support rendering two completely different layouts based on your selection.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Verification Plan&lt;/strong&gt;
&lt;/h2&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Manual Verification&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;I will write the updated code and you will flash it to your badge via PlatformIO or Arduino IDE.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We will verify that the badge broadcasts the &lt;code&gt;CMNode-Config&lt;/code&gt; Wi-Fi network.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We will connect to it, open the web page, submit new data, and verify that the E-paper display updates immediately.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We will reboot the badge to confirm the data is preserved.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We will toggle between the Classic and Fantastic screens to verify the layouts.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;As you can see, we now have a clear idea of how the second screen should look and a plan to implement everything, but before spawning the agent work, I'd also like to have a design of the first screen of the badge, so using the chat, I ask to include it also in the plan.&lt;br&gt;&lt;br&gt;
After two iterations of the prompt, this is the 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%2Fekeo6h4eg4w6ca64owdw.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%2Fekeo6h4eg4w6ca64owdw.png" width="800" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The implementation
&lt;/h3&gt;

&lt;p&gt;To implement the plan, we just need to press the Proceed button and wait&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%2F91zg60zwkqr2r24ughdg.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%2F91zg60zwkqr2r24ughdg.png" width="799" height="176"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;During the implementation, we can check what is happening through the UI&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%2Fm7lais4obiea9cy8kvtl.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%2Fm7lais4obiea9cy8kvtl.png" width="800" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if we notice something weird, we can stop the agent and type a new prompt to drive it again on the right path.&lt;br&gt;&lt;br&gt;
If you, like me, prefer to get confirmation before running commands or editing files, you must also approve these actions through the UI.&lt;/p&gt;

&lt;p&gt;After 2 minutes, this is the 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%2F56rjqczbk93xqy75up3x.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%2F56rjqczbk93xqy75up3x.png" width="800" height="645"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And if I connect my laptop to the badge Wi-Fi, I can configure my badge.&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%2Fovtot820jj87ux346wlo.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%2Fovtot820jj87ux346wlo.png" width="800" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The refine
&lt;/h3&gt;

&lt;p&gt;Now we have a badge working, but we want to improve it a bit: first, I want to change the screen by pressing the button on the back without connecting to the badge's Wi-Fi, and I want to set the Wi-Fi password via Environment Variables.&lt;br&gt;&lt;br&gt;
So I can prompt this&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Can we also change the screen view using the button on the rear of the badge without connecting to the badge's Wi-Fi?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And after a minute, the result is ready, and my badge has been flashed.&lt;br&gt;&lt;br&gt;
And lastly, I can ask not to hard-code the password but use an environment variable,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;use an environment variable for the wifi password&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;same here, after one minute and a couple of approvals, the result is again ready and in my badge.&lt;/p&gt;

&lt;p&gt;To complete, I want to change the layout by using one of the buttons on the back of the badge. So again I ask Antigravity to do it for me.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Can we change the screen view also by using the button in the rear of the badge without connecting to the badge wifi?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and same here, after some minutes, sometimes the result is happier in the badge.&lt;/p&gt;

&lt;p&gt;And the final result is this one&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%2Fd9r92nf2e97kqp6ez3pr.jpg" 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%2Fd9r92nf2e97kqp6ez3pr.jpg" width="800" height="1067"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and this one&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%2F63zj0c26tiy8mki4hohl.jpg" 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%2F63zj0c26tiy8mki4hohl.jpg" width="800" height="1067"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;It's time to wrap up!&lt;br&gt;&lt;br&gt;
So my experience with Antigravity has been great! I love to use it to build new things, or as a teammate to learn new technology, or just to prototype a pet project like this one.&lt;/p&gt;

&lt;p&gt;If you are in the agentic development, this tool can be a good one for you!&lt;br&gt;&lt;br&gt;
The experience is great, and if you want to have control over different projects or streams, it can be really helpful. The only pain point for me is the fact that if you want to check the code, you must install another tool, the Antigravity IDE, to check it.&lt;/p&gt;

&lt;p&gt;In this era of agent development, what I find great is the ability to plan and review the changes before the agent implements them! This is the game-changer for me in this moment, and then a lot and a lot of code review!&lt;/p&gt;

&lt;p&gt;Okay, that's it! I hope you enjoy this introduction to Antigravity and that you now want to test it for your project.&lt;/p&gt;

&lt;p&gt;I hope you also like my new super badge 🚀&lt;/p&gt;

&lt;p&gt;&lt;em&gt;p.s. to check the code result, you can navigate to this&lt;/em&gt; &lt;a href="https://github.com/Puppo/codemotion-badge" rel="noopener noreferrer"&gt;&lt;em&gt;repository&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Google Cloud credits are provided for this project.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>agenticarchitect</category>
      <category>googleantigravity</category>
    </item>
    <item>
      <title>Take control of your job with GitLens Launchpad</title>
      <dc:creator>Luca Del Puppo</dc:creator>
      <pubDate>Tue, 23 Dec 2025 07:00:00 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/take-control-of-your-job-with-gitlens-launchpad-4oo2</link>
      <guid>https://dev.to/playfulprogramming/take-control-of-your-job-with-gitlens-launchpad-4oo2</guid>
      <description>&lt;p&gt;As a developer, you have to take control of your projects every day. Whether it is a company repository, an open source project you maintain or collaborate on, or a simple pet project.&lt;/p&gt;

&lt;p&gt;Gaining control over your projects often depends on the platform you're working with. While there are many options available, such as &lt;a href="http://atlassian.com/" rel="noopener noreferrer"&gt;Atlassian&lt;/a&gt; and &lt;a href="https://gitlab.com" rel="noopener noreferrer"&gt;GitLab&lt;/a&gt;, today I will focus on using &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; as the platform of choice. Let me guide you through how you can effectively manage your projects on &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I’ll talk about the &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; one because that is where I’m working on.&lt;/p&gt;

&lt;p&gt;For me, checking the status of my PRs is essential in my daily work. On average, I spend about one or two hours a day tracking down failing CI checks and keeping my PRs in sync with the main branch, or reviewing other PRs.&lt;/p&gt;

&lt;p&gt;To do that, I used to use the &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; website on &lt;a href="https://github.com/pulls" rel="noopener noreferrer"&gt;my PRs page&lt;/a&gt;. This page is good; you can find all your PRs, including those where your teammates are requesting a review. You can check whether your PR has reviews and whether the CI passes.&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.amazonaws.com%2Fuploads%2Farticles%2F4eb207mh7zc4qc4fxonk.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%2F4eb207mh7zc4qc4fxonk.png" alt="github.com pull requests" width="800" height="728"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here you can see my PRs at this specific moment.&lt;/p&gt;

&lt;p&gt;As you can see, you can immediately receive information about the PRs, the number of comments, and more.&lt;/p&gt;

&lt;p&gt;I used this page for a while because it is a perfect way to check all the work across many repositories, but it has a small problem: to check the page, I have to switch between &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VSCode&lt;/a&gt; and the browser during my job. This constant switching might seem trivial, but research suggests it takes an average of 23 seconds to return to a productive state after such a context switch. In the fast-paced developer environment, these seconds add up, potentially impacting overall efficiency and output.&lt;/p&gt;

&lt;p&gt;So, I decided to search for another solution that would let me have the same information across the projects without leaving my &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VSCode&lt;/a&gt; instance.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first useful extensions to the migration
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github" rel="noopener noreferrer"&gt;GitHub Pull Requests&lt;/a&gt; was the first extension I started to test. This extension enables checking all PRs in the current repository I’m working on. I can see my open PRs and my teammates' open PRs. From a &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VSCode&lt;/a&gt; panel, I can check the status of a PR or review another one.&lt;br&gt;&lt;br&gt;
This extension enables us to open a PR directly from &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VSCode&lt;/a&gt; without using the &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; website, reducing the need to switch context between the editor and the &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; website.&lt;br&gt;&lt;br&gt;
Here is a picture of the extension&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.amazonaws.com%2Fuploads%2Farticles%2F5ckvxthwheha79ip123j.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%2F5ckvxthwheha79ip123j.png" alt="GitHub Pull Requests Extension" width="800" height="467"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, in the left panel, we can control PRs and Issues. By clicking the PR, we can view its home page. By clicking the arrow icon that appears when you hover over the PR, you can go to the Review mode and add comments or suggestions to that PR.&lt;/p&gt;

&lt;p&gt;That extension has improved my DX experience, especially in PR creation and review, but, as you can see, it works only on the open repository, which is a limitation, since I cannot see if in other projects something or someone is blocked by my work, or it’s waiting for a review or something else.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Final Solution
&lt;/h2&gt;

&lt;p&gt;While browsing the web, I came across a feature of &lt;a href="https://www.gitkraken.com/" rel="noopener noreferrer"&gt;GitKraken&lt;/a&gt; called &lt;a href="https://www.gitkraken.com/features/launchpad" rel="noopener noreferrer"&gt;Launchpad&lt;/a&gt;. This feature enables us to get a big-picture view of all issues and PRs where we are the creator or a follower. If you don’t know &lt;a href="https://www.gitkraken.com/" rel="noopener noreferrer"&gt;GitKraken&lt;/a&gt;, it is a Git client with an awesome UI for managing your repositories. You can use it as a &lt;a href="https://www.gitkraken.com/git-client?_gl=1*1yb8ynx*_up*MQ..*_ga*MTM4MjU2MTEwMS4xNzY2MjM2Mjc3*_ga_TTGBQHQ5E4*czE3NjYyMzYyNzYkbzEkZzAkdDE3NjYyMzYyNzYkajYwJGwxJGgxNjcyOTAyNTQ3" rel="noopener noreferrer"&gt;desktop app&lt;/a&gt;, &lt;a href="https://gitkraken.dev/" rel="noopener noreferrer"&gt;website&lt;/a&gt;, editor extension (&lt;a href="https://www.gitkraken.com/gitlens?_gl=1*w5a9a6*_up*MQ..*_ga*MTEyMDYwODM3LjE3NjYyMzYzMTQ.*_ga_TTGBQHQ5E4*czE3NjYyMzYzMTMkbzEkZzAkdDE3NjYyMzYzMTMkajYwJGwxJGgyMDQ0NjUzMjY0" rel="noopener noreferrer"&gt;GitLens&lt;/a&gt;), or the &lt;a href="https://www.gitkraken.com/cli?_gl=1*1ltt9q5*_up*MQ..*_ga*MTEyMDYwODM3LjE3NjYyMzYzMTQ.*_ga_TTGBQHQ5E4*czE3NjYyMzYzMTMkbzEkZzEkdDE3NjYyMzY2ODgkajYwJGwxJGgyMDQ0NjUzMjY0" rel="noopener noreferrer"&gt;CLI&lt;/a&gt;. They have also released an &lt;a href="https://www.gitkraken.com/mcp?_gl=1*1p7bqfc*_up*MQ..*_ga*MTEyMDYwODM3LjE3NjYyMzYzMTQ.*_ga_TTGBQHQ5E4*czE3NjYyMzYzMTMkbzEkZzEkdDE3NjYyMzY3MjAkajI4JGwxJGgyMDQ0NjUzMjY0" rel="noopener noreferrer"&gt;MCP server&lt;/a&gt; in the last period to manage your repository through an LLM.&lt;br&gt;&lt;br&gt;
As you can imagine, I use the &lt;a href="https://www.gitkraken.com/gitlens" rel="noopener noreferrer"&gt;GitLens&lt;/a&gt; extension, which has a panel that lets me see everything across my repositories.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Spoiler: I use it with&lt;/em&gt; &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;&lt;em&gt;GitHub&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, but you can also use it with&lt;/em&gt; &lt;a href="https://bitbucket.org/" rel="noopener noreferrer"&gt;&lt;em&gt;Bitbucket&lt;/em&gt;&lt;/a&gt; &lt;em&gt;and&lt;/em&gt; &lt;a href="https://gitlab.com/" rel="noopener noreferrer"&gt;&lt;em&gt;GitLab&lt;/em&gt;&lt;/a&gt;&lt;em&gt;. It can also combine data across different platforms.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq3us68bhv49mb7fs3wp6.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%2Fq3us68bhv49mb7fs3wp6.png" alt="GitLens Lauchpad" width="800" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this panel, there are different groups where you can find your PRs that meet that status. If you click the PR, you will see a pop-up that lets you get more info or jump into the repository if you have already set it up on your machine.&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.amazonaws.com%2Fuploads%2Farticles%2F5p2cm57xnjhkpno8suvk.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%2F5p2cm57xnjhkpno8suvk.png" alt="GitLens Lauchpad Pop-Up" width="800" height="496"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, just using these two extensions, I reduced the number of switches between my lovely &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VSCode&lt;/a&gt; and the &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; website. In my editor, I already have control over all my repositories, and with the correct panel, I can do most of my work directly in the editor.&lt;/p&gt;

&lt;p&gt;Before closing, I’d like to give you another extension that reduces the need to switch between the editor and the &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; website. This extension is the &lt;a href="https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions" rel="noopener noreferrer"&gt;GitHub Actions&lt;/a&gt; one. This extension lets you check the status of actions directly in the editor, without jumping to &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; to search for them.&lt;/p&gt;

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

&lt;p&gt;It’s time to wrap up this article.&lt;br&gt;&lt;br&gt;
At first, I showed how I used to check my current work across projects on &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, but eventually it became a pain point because switching between the editor and the browser was annoying.&lt;br&gt;&lt;br&gt;
Then I moved to the &lt;a href="https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github" rel="noopener noreferrer"&gt;GitHub Pull Requests&lt;/a&gt; extension, which enables me to open, review, and check PRs and Issues in the current open repository.&lt;br&gt;&lt;br&gt;
Lastly, I talked about the &lt;a href="https://www.gitkraken.com/gitlens" rel="noopener noreferrer"&gt;GitLens&lt;/a&gt; &lt;a href="https://www.gitkraken.com/features/launchpad" rel="noopener noreferrer"&gt;Launchpad,&lt;/a&gt; which, through a panel in the editor, provides a big-picture view of all the PRs across the repositories I’m working on and helps me reduce switching between the editor and &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; during my daily work.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you want to use the&lt;/em&gt; &lt;a href="https://www.gitkraken.com/gitlens" rel="noopener noreferrer"&gt;&lt;em&gt;GitLens&lt;/em&gt;&lt;/a&gt; &lt;em&gt;Launchpad, it is a PRO feature that requires a valid&lt;/em&gt; &lt;a href="https://www.gitkraken.com/" rel="noopener noreferrer"&gt;&lt;em&gt;GitKraken&lt;/em&gt;&lt;/a&gt; &lt;em&gt;license. To buy one, check this&lt;/em&gt; &lt;a href="https://gitkraken.cello.so/I4dkhuQcpJN" rel="noopener noreferrer"&gt;&lt;em&gt;link&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That’s it for this article. I hope this feature can also improve your daily DX, and see you in the following articles.&lt;/p&gt;

&lt;p&gt;Bye bye 👋&lt;/p&gt;

</description>
      <category>gitkraken</category>
      <category>tooling</category>
    </item>
    <item>
      <title>The Mood Mirror App - My Antigravity first experience</title>
      <dc:creator>Luca Del Puppo</dc:creator>
      <pubDate>Thu, 04 Dec 2025 06:03:00 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/the-mood-mirror-app-my-antigravity-first-experience-10a4</link>
      <guid>https://dev.to/playfulprogramming/the-mood-mirror-app-my-antigravity-first-experience-10a4</guid>
      <description>&lt;p&gt;Just a week ago, Google launched &lt;a href="https://antigravity.google/" rel="noopener noreferrer"&gt;Antigravity&lt;/a&gt;, and why not give it a try and share my experience? And here I am for this.&lt;/p&gt;

&lt;p&gt;In this article, I'll talk about my first experience with Antigravity and how I built a small web app called &lt;strong&gt;The Mood Mirror&lt;/strong&gt;. This app emulates an artist who can convert your mood into abstract images or videos.&lt;/p&gt;

&lt;p&gt;Spoiler: this app uses &lt;a href="https://deepmind.google/models/gemini/" rel="noopener noreferrer"&gt;Gemini 3&lt;/a&gt;, &lt;a href="https://gemini.google/overview/image-generation/" rel="noopener noreferrer"&gt;Nano Banana Pro&lt;/a&gt; and &lt;a href="https://gemini.google/overview/video-generation/" rel="noopener noreferrer"&gt;Veo&lt;/a&gt;, but I'll talk about them in a future article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Antigravity Intro
&lt;/h2&gt;

&lt;p&gt;Let's start with a small presentation about Antigravity.&lt;/p&gt;

&lt;p&gt;Google Antigravity is an Agentic IDE. It is a fork of VSCode with a dedicated agent section that features models such as Gemini, Claude, and GPT.&lt;/p&gt;

&lt;p&gt;This last part is what makes Antigravity different from VSCode or Cursor; this section is built and maintained by Google. Yes, the experiences are common, but how this Agent section is integrated into the IDE is what differentiates it from the others, and this is where all the IDE teams are working to improve their users' DX.&lt;/p&gt;

&lt;p&gt;For more info about Google Antigravity, you can check its website &lt;a href="https://antigravity.google/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  "The Mood Mirror" Setup
&lt;/h2&gt;

&lt;p&gt;To test the tool's full power, I decided to build the application almost entirely in "Vibe Coding". To that end, I began by setting up the project and wrote a prompt outlining my intention and what I hoped to achieve.&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.amazonaws.com%2Fuploads%2Farticles%2Fyg8obm27dltd6ty6bshh.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%2Fyg8obm27dltd6ty6bshh.png" alt="Antigravity Screen" width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this picture, you can see what Antigravity looks like, and as you can imagine, in the chat, you can prompt our intention.&lt;/p&gt;

&lt;p&gt;For my application, I entered this prompt.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Role:&lt;/strong&gt; You are a Senior Software Engineer Agent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project:&lt;/strong&gt; Build a responsive web application called &lt;strong&gt;"Mood Mirror"&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stack:&lt;/strong&gt; React, Tailwind CSS, and the Gemini 3 SDK.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Core Functionality:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Input:&lt;/strong&gt; Create a clean, minimalist text area where the user enters how they feel (e.g., "I am anxious about my deadline").&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The "Director" Logic (Gemini 3):&lt;/strong&gt; When the user submits, send the text to Gemini 3.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Analyse the &lt;strong&gt;Sentiment Score&lt;/strong&gt; (0 to +1.0).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Extract an &lt;strong&gt;Emotional Colour Palette&lt;/strong&gt; (e.g., "Stormy Grey and Electric Blue").&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generate a &lt;strong&gt;Creative Prompt&lt;/strong&gt; for an abstract art piece based on that emotion.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The "Artist" Execution (Nano Banana):&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Pass the &lt;em&gt;Creative Prompt&lt;/em&gt; to the Nano Banana Pro API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Conditional Logic:&lt;/strong&gt; If the Sentiment Score is extreme (above 0.8 or below -0.8), request a &lt;strong&gt;5-second looping Video (MP4)&lt;/strong&gt;. Otherwise, request a &lt;strong&gt;High-Res Image (PNG)&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic UI:&lt;/strong&gt; Update the app's background gradient instantly to match the &lt;em&gt;Emotional Colour Palette&lt;/em&gt; returned by Gemini while the image generates.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Execution Plan:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Scaffold the project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write the SentimentService using the Gemini 3 logic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implement the Nano Banana API hook.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Deploy to preview.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result of this prompt was a plan of action for Antigravity to implement my request. I got this result because I selected "planning" in the bottom-left drop-down. If you decide to go with the fast option, Antigravity doesn't show the plan and immediately develops it.&lt;/p&gt;

&lt;p&gt;Btw, I chose the planning options so that I can check and comment on this plan directly in the IDE.&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.amazonaws.com%2Fuploads%2Farticles%2Fsj7xr24a7xq3wu9e5cqh.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%2Fsj7xr24a7xq3wu9e5cqh.png" alt="Execution Plan" width="800" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the image above, you can see an example of the plan I received. As you can see, you can either accept it or review it, and then ask Antigravity to check your comments and review the plan.&lt;/p&gt;

&lt;p&gt;The prompt and its plan are the result of this &lt;a href="https://github.com/Puppo/the-mood-mirror/commit/e5a2784b77c93014a9cb36ecd70c94a2ef8e4a13" rel="noopener noreferrer"&gt;commit&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What went wrong? 😑&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The setup has gone smoothly and pretty well, but I ran into an issue: Antigravity generated a JavaScript application rather than a TypeScript one. Not a big deal. Later, I asked it to review the project in JavaScript and TypeScript, and it converted it without any issues. &lt;a href="https://github.com/Puppo/the-mood-mirror/commit/66ba677e104cca6c1c09de4d339e1e6e9cae4c77" rel="noopener noreferrer"&gt;Here&lt;/a&gt; you can see the result.&lt;br&gt;&lt;br&gt;
And lastly, it generated two files, one for the Sentiment discovery and the other for the image generation, but it created a sort of mock service without.&lt;br&gt;&lt;br&gt;
I didn’t iterate again to fix them, but I’ve worked on them later.&lt;/p&gt;
&lt;h2&gt;
  
  
  Commit linting into the project
&lt;/h2&gt;

&lt;p&gt;The second test I did was about setting up a development tool to verify the commit messages. I like to use commitlint and conventional commits for my project, so my second test was adding the setup for these tools.&lt;br&gt;&lt;br&gt;
I opened a new chat, and I entered this prompt.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I want to add commitlint and conventional-commit to this project. Can you set it up?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I was concerned that the prompt wasn’t particular, but I did it to see what Antigravity produces and how good the results are.&lt;/p&gt;

&lt;p&gt;I ran that prompt in “fast” mode, and the first result was pretty good. It installs and sets up &lt;code&gt;@commitlint/cli&lt;/code&gt; and &lt;code&gt;@commitlint/config-conventional&lt;/code&gt; and after that, it added &lt;code&gt;husky&lt;/code&gt; to validate the commit message in the pre-commit hook. I’m not a &lt;code&gt;husky&lt;/code&gt; fan, I prefer &lt;code&gt;lefthook&lt;/code&gt;. So after this first iteration, I asked Antigravity to replace &lt;code&gt;husky&lt;/code&gt; with &lt;code&gt;lefthook&lt;/code&gt;. The result I got worked, but it wasn’t the best solution ever. I decided not to reiterate this time, to leave it in the repo and also show what an Agentic IDE can generate when we don’t check its results and trust it too much.&lt;/p&gt;

&lt;p&gt;In this second iteration, Antigravity added lefthook without any problem, but it didn’t remove all the &lt;code&gt;husky&lt;/code&gt; references. In fact, if you check the &lt;a href="https://github.com/Puppo/the-mood-mirror/commit/1ca9fed538fa1ee15f3e8dd07ac149e01ee68bf3" rel="noopener noreferrer"&gt;commit&lt;/a&gt;, you can see the &lt;code&gt;_husky&lt;/code&gt; folder with two files, with no sense script for this repo, and in the &lt;code&gt;package.json&lt;/code&gt;, it forgot to remove the &lt;code&gt;prepare&lt;/code&gt; script.&lt;/p&gt;

&lt;p&gt;As you can see, our code review when using these tools is crucial to avoid trash or unnecessary code.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Gemini 3.0 integration
&lt;/h2&gt;

&lt;p&gt;The next test was the Gemini integration to build the Sentiment analysis service.&lt;br&gt;&lt;br&gt;
As I did in the previous tests, I started from a new chat.&lt;br&gt;&lt;br&gt;
The prompt in this case was a bit more articulated. I asked to generate a service that accepts a text and, through Gemini, returns a structured result with these fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;moodScore&lt;/em&gt;: a value between 0 and 1 to determine the mood score&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;promptType&lt;/em&gt;: This is the value that determines if the mirror will show an image or a video&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;promptText&lt;/em&gt;: This is the text to pass later to generate the video or the image&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This result must later be used to generate an image or a video using NanoBanana Pro or Veo 3.&lt;/p&gt;

&lt;p&gt;This iteration has been a bit convoluted. The first version used the old npm package &lt;code&gt;@google/generative-ai&lt;/code&gt; and not the new one &lt;code&gt;@google/genai&lt;/code&gt;. So I kept reiterating to get the code updated to the new version of the SDK. Another issue I had was that Antigravity created a single file to handle both images and videos. So, for that, I reiterated the need to split the logic for image and video generation into two separate files, and I also fixed the video generation to use the video model instead of the image model.&lt;/p&gt;

&lt;p&gt;After that, I got a working application that met my first requirements, and you can see a demo in the video below. &lt;em&gt;[and&lt;/em&gt; &lt;a href="https://github.com/Puppo/the-mood-mirror/commit/9dc0d5f74ee505ecf3f04f7baa53248eeea0e331#diff-053150b640a7ce75eff69d1a22cae7f0f94ad64ce9a855db544dda0929316519" rel="noopener noreferrer"&gt;&lt;em&gt;here&lt;/em&gt;&lt;/a&gt; &lt;em&gt;you can check the commit]&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/098qvXvpVZQ" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

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

&lt;p&gt;It’s time to wrap up this first experience with Antigravity.&lt;/p&gt;

&lt;p&gt;Overall, the experience with the tool was good. This is its first version, and only a few weeks after its release, Antigravity showed great DX and a good understanding of what I want to achieve.&lt;/p&gt;

&lt;p&gt;Yes, it is not perfect, and in some cases, the plan described at the beginning hasn’t been satisfied. But this also happens with IDEs that have been in place for months.&lt;/p&gt;

&lt;p&gt;As with the other Agentic IDEs, including Antigravity, developer checks are key to boosting implementation velocity while maintaining codebase quality.&lt;/p&gt;

&lt;p&gt;The planning mode is fantastic in my opinion, because taking a look at the plan and reviewing or confirming it before starting the implementation can reduce the time wasted on reiterating the Agent result; as we saw, it’s still not perfect yet, but I’m pretty sure it will be tuned and improved in the future.&lt;/p&gt;

&lt;p&gt;If I had to rate this first experience, I'd give it&amp;nbsp;&lt;strong&gt;7/10&lt;/strong&gt; because the flow was excellent, but I expected more precise results.&lt;/p&gt;

&lt;p&gt;Okay, that’s all. I hope you enjoyed this article. Let me know in the comments your experience with Antigravity or other Agentic IDEs.&lt;/p&gt;

&lt;p&gt;Bye Bye 👋&lt;/p&gt;

</description>
      <category>ai</category>
      <category>gemini</category>
      <category>vibecoding</category>
      <category>antigravity</category>
    </item>
    <item>
      <title>Improve Your Git Commit Messages with GitLens Tips</title>
      <dc:creator>Luca Del Puppo</dc:creator>
      <pubDate>Fri, 03 Oct 2025 06:13:45 +0000</pubDate>
      <link>https://dev.to/playfulprogramming/improve-your-git-commit-messages-with-gitlens-tips-50hg</link>
      <guid>https://dev.to/playfulprogramming/improve-your-git-commit-messages-with-gitlens-tips-50hg</guid>
      <description>&lt;p&gt;In the AI era, we can do many different things with LLM: generate code, images, videos or ask whatever we want and wait for an answer.&lt;br&gt;&lt;br&gt;
The AI is here, and we cannot snub it. I love using it to simplify my day, help me find solutions, or learn new things. For instance, one of the most challenging tasks I perform every day is crafting a commit message for my next commit. I love to commit often, and I avoid commit messages like “WIP”, “work in progress”, “first step”, “second step”, and so on.&lt;br&gt;&lt;br&gt;
In the past, I spent a considerable amount of time crafting the perfect commit message for the next commit. Currently, thanks to&amp;nbsp;&lt;a href="https://www.gitkraken.com/gitlens" rel="noopener noreferrer"&gt;GitLens&lt;/a&gt;&amp;nbsp;(by&amp;nbsp;&lt;a href="https://www.gitkraken.com/" rel="noopener noreferrer"&gt;GitKraken&lt;/a&gt;), I can ask for help from the AI to generate a prefilled message based on my actions, and then review the generated message.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to generate messages
&lt;/h2&gt;

&lt;p&gt;To generate the commit messages, first of all, you have to change your codebase 😎&lt;br&gt;&lt;br&gt;
After that, when you are ready to commit, it’s time to generate the message.&lt;br&gt;&lt;br&gt;
To do that, you need to go to the Source Control panel in&amp;nbsp;&lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VSCode,&lt;/a&gt;&amp;nbsp;and if you have the &lt;a href="https://www.gitkraken.com/gitlens" rel="noopener noreferrer"&gt;GitLens&lt;/a&gt; extension installed, you can use the “Magic” icon to generate the message.&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.amazonaws.com%2Fuploads%2Farticles%2Frdd1xjyetq58cohey0sj.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%2Frdd1xjyetq58cohey0sj.png" alt="GitLens Context Menu" width="800" height="532"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you click the button, you should have three options&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Generate Commit Message with GitLens&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Compose Commit (Preview)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Switch GitLens AI Provider/Model&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffa7s8aanw88nhjshkijk.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%2Ffa7s8aanw88nhjshkijk.png" alt="GitLens Context Menu Options" width="800" height="545"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It goes without saying that the first option is the correct one to use when generating your commit message.&lt;/p&gt;

&lt;p&gt;After clicking the button, you must wait for a couple of seconds, and the result will appear in the text box.&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.amazonaws.com%2Fuploads%2Farticles%2Fjjr2fsk1mkrr7lpabpha.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%2Fjjr2fsk1mkrr7lpabpha.png" alt="Generated commit message" width="800" height="897"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see, the result is excellent. A commit message that follows the conventional commit rules and a small description of what happened in the code.&lt;/p&gt;

&lt;p&gt;Now, you can decide whether the message is okay and commit without changing it, or review it and then commit with your edited message.&lt;/p&gt;

&lt;h2&gt;
  
  
  Custom Instructions
&lt;/h2&gt;

&lt;p&gt;As with all AI features, instructions are crucial to achieving the best possible result.&lt;br&gt;&lt;br&gt;
Also, for this feature, we can set up instructions to guide the AI in creating the messages.&lt;br&gt;&lt;br&gt;
To do that, you have to go to Settings and search for “GitLens commit message AI custom instruction”.&lt;br&gt;&lt;br&gt;
You should find an option “&lt;strong&gt;Gitlens › Ai › Generate Commit Message: Custom Instructions (Preview)”&lt;/strong&gt;, and this option has a text box that you can fill.&lt;br&gt;&lt;br&gt;
In my case, I inserted this instruction: “Please generate the commit message in the format of conventional commit,” but you can insert all the instructions that you want.&lt;br&gt;&lt;br&gt;
These instructions will help the AI generate the best messages based on your needs, and they will likely reduce the changes required to achieve the best message in the end.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;

&lt;p&gt;As you can see, this feature is pretty simple but very helpful. It can reduce the time you spend generating commit messages and help you describe the intention of your commits in the best way.&lt;br&gt;&lt;br&gt;
I use it daily, and it helps me to be more precise in my commit messages, which in turn helps me summarise the commit in the best way.&lt;br&gt;&lt;br&gt;
&lt;em&gt;N.B. I’m not a native English speaker, and this feature helps me express myself in the best possible way in my commits.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Okay, that’s all, folks. I hope you’ve enjoyed the content and found it helpful.&lt;br&gt;&lt;br&gt;
See you soon&lt;/p&gt;

&lt;p&gt;Bye Bye 👋&lt;/p&gt;

</description>
      <category>git</category>
      <category>gitkraken</category>
      <category>ai</category>
      <category>gitlens</category>
    </item>
  </channel>
</rss>
