to-html
To HTML
Produce one HTML file a reader can open locally, offline, and understand without the conversation. Preserve the user's language unless the destination's instructions require another language. Follow repository instructions.
Establish the document
Use the requested topic and audience, or the current discussion when omitted. Capture the context, explanation, decisions, tradeoffs, and unresolved questions that matter to the reader. Distinguish decisions from proposals and preserve uncertainty. Read referenced code or documents when needed to support claims.
Use the requested path. Otherwise follow an established documentation location,
falling back to docs/explanations/<topic>.html in the working directory. Choose
a short kebab-case filename and create parent directories. Read an existing
target before editing it; preserve unrelated content and use a fresh filename
when replacement was not requested.