---
title: "Working With AI: A Concrete Example"
description: "A regression in hyperscript 0.9.91 caused `fetch <url> as JSON` to bind `as` as a conversion expression on the URL."
url: "https://swe.quest/articles/working-with-ai-a-concrete-example-53cea94b1ea67643"
canonical: "https://htmx.org/essays/working-with-ai/"
source: "htmx essays"
published: "2026-06-29"
difficulty: "medium"
kind: "Opinion"
reading_minutes: 9
tags: ["ai-coding","compilers","language-design","debugging","javascript"]
---

# Working With AI: A Concrete Example

A post on [htmx essays](https://swe.quest/sources/htmx.md), published 2026-06-29, 9 min read, Opinion. Original: [https://htmx.org/essays/working-with-ai/](https://htmx.org/essays/working-with-ai/)

## Summary

A regression in hyperscript 0.9.91 caused \`fetch \<url\> as JSON\` to bind \`as\` as a conversion expression on the URL. A refactor had made \`fetch\` and \`go\` share \`parseURLOrExpression()\`, which widened the grammar to accept a general expression. Claude found the root cause quickly and wrote good focused tests, but its fixes were a string-literal hack, a new \`noConversions\` parser flag, and then an overly broad change that also broke \`as\` in \`go\`. The final fix reused the parser's existing "follows" mechanism, pushing \`as\` as a follow token only inside \`FetchCommand#parse()\`. The story illustrates why a human who knows the codebase's architecture should stay in the loop to keep AI-proposed fixes from piling up technical debt.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [Compilers](https://swe.quest/tags/compilers.md) (Compilers & runtimes)
- [Language design](https://swe.quest/tags/language-design.md) (Compilers & runtimes)
- [Debugging](https://swe.quest/tags/debugging.md) (Engineering practices)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)

## Prerequisites

- recursive descent parsing
- JavaScript ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))

## Keywords

hyperscript, Claude, parseURLOrExpression, recursive descent parser, Sorcerer's Apprentice problem

## Related posts

- [Prompt Engineering as a Developer Discipline](https://swe.quest/articles/prompt-engineering-as-a-developer-discipline-9bcd55d9132c84f2.md): Neon · 2025-04-21 · Medium · 16 min read · AI for coding, LLMs
  Developers should treat prompts as modular, testable software components rather than guesswork, applying the same rigor they bring to code.
- [@clickhouse/rowbinary: when your library is also a parser compiler](https://swe.quest/articles/clickhouse-rowbinary-when-your-library-is-also-a-parser-compiler-a30fc022f9070ed3.md): ClickHouse · 2026-07-14 · Medium · 10 min read · AI for coding, Performance engineering, TypeScript, Analytics & OLAP, Compilers
  @clickhouse/rowbinary is a Node.js reader/writer for ClickHouse's RowBinary formats that also ships as an Agent Skill: a coding agent reads its densely commented, monomorphizable primitives plus SKILL.md and generates a parser specialized to a query's exact column types, replacing a traditional codegen compiler.
- [How to Fix ESLint Violations with AI Assistance](https://swe.quest/articles/how-to-fix-eslint-violations-with-ai-assistance-74d040edadf71958.md): Docker · 2024-08-26 · Medium · 8 min read · AI for coding, AI agents, Static analysis, TypeScript, LLMs
  An LLM can produce correct fixes for ESLint violations once it has tools that supply minimal, precise context.
- [Testing AI coding agents (2025): Cursor vs. Claude, OpenAI, and Gemini](https://swe.quest/articles/testing-ai-coding-agents-2025-cursor-vs-claude-openai-and-gemini-4ba683d74eb76f3f.md): Render · 2025-08-12 · Medium · 16 min read · AI for coding, AI agents, Developer tools, Evaluation
  Four AI coding agents (Cursor with Claude Sonnet 4, Claude Code, Gemini CLI and OpenAI Codex) were compared on a one-prompt Next.js URL-shortener build with Postgres, Docker and Render MCP deployment, plus real tasks in a large Go API monorepo (Kubernetes pod leader election with go-quartz, NATS retry logic) and an Astro/Keystatic website.
- [Giving V8 a Heads-Up: Faster JavaScript Startup with Explicit Compile Hints](https://swe.quest/articles/giving-v8-a-heads-up-faster-javascript-startup-with-explicit-compile-hints-dd239c9384ec103b.md): V8 · 2025-04-29 · Medium · 3 min read · Runtimes & VMs, Web performance, JavaScript, Browsers
  Chrome 136 ships Explicit Compile Hints, which let developers mark a JavaScript file for eager compilation by placing the magic comment \`//# allFunctionsCalledOnLoad\` at the top.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
