I will say I came upon this same design pattern to make all my chats into semantic Markdown that is backward compatible with markdown. I did: ````assistant gemini/3.1-pro - 20260319T050611Z Response from the assistant ```` with a similar block for tool calling This can be parsed semantically as part of the conversation but also is rendered as regular Markdown code block when needed Helps me keep AI chats on the files…
So many formats, with different tradeoffs around readable/parsable/comments/etc. I wish there was a "universal" converter. With LLM's sometimes used to edit chat traces, I'd like ingestion from md/yaml, not merely a "render from message json".
So .json `[{"role": "user", "content": "Hi"}` .md ` ```json\n[{"role": "user", "content": "Hi"}` above ` ```user\nHi` `# User\nHi` ` ```chatML\n\nHi` .html rendered .md, but with elements like and escaped... etc.