Live data from Hacker News

Using Claude Code: The unreasonable effectiveness of HTML

twitter.com

41–50 of 308 posts

Re: Using Claude Code: The unreasonable effectiveness of HTML

#41
I moved from Markdown to JSON for all spec writing about 9 months ago. Although not HTML, it still has the same benefits. Claude and the other models are just so much more reliable in a structured format like JSON/HTML/XML.

The most important thing is that I can run static analysis on a structured format. This is important even for my spec documents. I can write data fields and have static analysis analyze it. For example, to confirm database fields match across various spec documents, etc.. The static analysis is also why you use JSON/XML instead of HTML, since you can now have your own custom schema.

Also don't use YAML, as that's far more unreliable. (If you chop a YAML file in half, it's still valid)

Re: Using Claude Code: The unreasonable effectiveness of HTML

#42
post #33
post #21

My concern here is that by gravitating to HTML you lose the ability for a human (you!) to easily co-author the document with the LLM. If it’s just an explainer for your consumption, that’s not a concern - but if it’s a spec sheet for something more complex, I deeply value being able to dive in and edit what is produced for me. With a HTML doc it is much harder to do that than with MD. Now of course you could just rep…

Is HTML really that much worse to edit than MD?

Let’s see…

    *No!*

    I mean, yes!

It depends what we mean I guess, isn’t Markdown supposed to allow [hx]ml tags anyway if user need them? Then it’s more about asking the LLM to generate Markdown with this in consideration, and privilege rendering the output of reports in the preferred browser after relevant rendering.

Re: Using Claude Code: The unreasonable effectiveness of HTML

#43
post #21

My concern here is that by gravitating to HTML you lose the ability for a human (you!) to easily co-author the document with the LLM. If it’s just an explainer for your consumption, that’s not a concern - but if it’s a spec sheet for something more complex, I deeply value being able to dive in and edit what is produced for me. With a HTML doc it is much harder to do that than with MD. Now of course you could just rep…

Yes, and you can always embed HTML in Markdown for , , , and other tags that cannot be coded in Markdown.

Re: Using Claude Code: The unreasonable effectiveness of HTML

#44
I was running into issues with markdown and mermaid the other day and decided to tell Claude to use HTML, then realized that opened up the option of JS as well. Given we were trying to model state management in an existing typescript application, we could use ts-morph to correctly map out the call sites within different components, even use math to determine various factors of refactoring or relocating and so on.

It ended up being a large document but it was infinitely more useful than plain old markdown. I think I’ll do it more often now. Creating interactive specs is a really fascinating way to work. I’ve always verified my work in similar ways, but this was more… Verification-forward, I guess. And it took hours instead of days.

It’s actually really fun to be building and refactoring these days. No idea how long the fun will last, but I’m thoroughly enjoying it right now. I know it will make some people think I’m a hack, but I know that approach enabled me to do a faster, more targeted, ultimately better job of improving state management in the application. It’s not because Claude wrote the code (I still did quite a bit of it), but because Claude helped me establish the right work to do for the right reasons, using tools I couldn’t dream of throwing together 5 years ago.

Re: Using Claude Code: The unreasonable effectiveness of HTML

#45
I've been struggling with markdown recently as I really want the claims it makes in documents to be programmatically verifiable e.g. citations, I want a simple script to check that each of the files and lines of code it references actually exist. Perhaps HTML can be used for this. It certainly has a better chance than markdown.

Re: Using Claude Code: The unreasonable effectiveness of HTML

#46

> I’ve started preferring HTML as an output format instead of Markdown and increasingly see this being used by others on the Claude Code team, this is why. This is why I read long agent output either by using VIM and MacOS Quicklook (with a markdown extension for rendering) or paste output into MarkEdit (an editor with a preview pane; I think it’s cross platform?). Worst case, have an agent build you a simple local w…

While I agree it probably uses more tokens, the author works for Anthropic and has probably never paid for a token

Re: Using Claude Code: The unreasonable effectiveness of HTML

#47
Claude understands AsciiDoc just fine. His training data makes it so that most AsciiDoc documents he generates uses Markdown-like capabilities, but a gentle push in an appended system prompt (like a “feel free to use all of AsciiDoc’s features”) makes him create very nice documents to iterate on, in my opinion.

Re: Using Claude Code: The unreasonable effectiveness of HTML

#49

I guess the author has never heard of Markdown editors with a preview feature, and doesn't know that the Claude Code VS Code plugin opens plans in preview mode.

Are you just trying to pretend that Markdown is as rich as HTML and that all the use cases that they described are possible with Markdown?

Technically, yes. Markdown was always intended to be used for creating HTML and thus allows you to use HTML inline (with some minor caveats, see: https://daringfireball.net/projects/markdown/syntax#html).

If you rename a .html file to .md, your markdown viewer should render it just the same as your browser did.

Re: Using Claude Code: The unreasonable effectiveness of HTML

#50
post #21

My concern here is that by gravitating to HTML you lose the ability for a human (you!) to easily co-author the document with the LLM. If it’s just an explainer for your consumption, that’s not a concern - but if it’s a spec sheet for something more complex, I deeply value being able to dive in and edit what is produced for me. With a HTML doc it is much harder to do that than with MD. Now of course you could just rep…

Makes sense for actual devs. For non-devs who'd just edit docs via LLMs anyway (myself), I can't imagine it'd introduce much friction.
Post reply on HN