html-output
HTML Output
Prefer a self-contained .html file over a long Markdown reply when output is dense, visual,
comparative, interactive, or shareable. HTML carries tables, diagrams, code, color, and two-way
controls Markdown can't — and a file opens/links anywhere.
Reach for it for: implementation plans (mockups + data-flow diagram + key code snippets) · N approaches in a side-by-side grid to compare · code review (render the diff, inline margin annotations, color by severity) · research/explainer (diagram + 3–4 annotated snippets + "gotchas") · prototypes (sliders/toggles to try options) · custom editors (draggable cards, forms with dependency warnings). Use a separate file per stage rather than one giant page.
Principles: accurate (real facts/code pulled from the thread — never invent) · self-contained
(one file; deps from CDN) · clean (whitespace, one accent, prose ≤ max-w-3xl; tables/diagrams do
the work) · interactive where it earns its keep.
Make it round-trip. Any editor/prototype needs an export — a "Copy as Markdown / JSON /
prompt" button wired to a toExport() helper that serialises the current UI state back to
pasteable text. That export is the whole reason to build a UI instead of a static doc.