to-md
To Markdown
Produce a Markdown file a reader can understand without the conversation. Preserve the user's language unless the destination's instructions require another language. Follow repository instructions and established document formats.
Establish the document
Use the requested topic and audience, or the current discussion when omitted. Capture the relevant context, explanation, decisions, tradeoffs, and unresolved questions. Distinguish agreed decisions from proposals; preserve uncertainty. Read referenced code or documents when needed to support concrete claims. Choose the structure around the topic rather than transcribing the chat.
Use the requested path. Otherwise follow an established documentation location,
falling back to docs/explanations/<topic>.md 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.