
I built a compiler for Word documents because I hate writing them in Word
I’m a lawyer. I write a lot of formal documents, and they ultimately need to be DOCX files because that is what clients, courts, and colleagues use.. I still prefer writing in Markdown. It is easier to read, edit, review in Git, and work on with an LLM. But the usual workflow is painful. You convert back and forth, fix formatting by hand, and hope the final document contains everything it should.
nowadays I draft my documents a bit like vibecoding.. and I've realized that this works much better when there is a compiler enforcing a contract. I want clear boundaries around what a valid document is. That is why I built docc.
It is not really a Pandoc alternative. Pandoc solves conversion. docc is about verification. A document has a schema, required metadata, explicit structures, and rules that must pass before it can produce a DOCX file. Themes handle layout, while the Markdown file remains the actual prose I edit.
I also did not want a template system where the real content disappears into YAML or template variables. That makes editing more painful than Word. The prose should stay inline and readable, with just enough structure for the compiler to check it.
The result is a useful baseline for an agent too. It can draft the Markdown, but it cannot build a document that breaks the rules. So its a bit like the inversion of templating if you will..
I’m not selling anything. I’m mostly curious whether others have this problem, or whether they are happy with conversion plus manual review.
Repo and docs: https://github.com/kevinzehnder/docc
P.S. I have a Go development background, so this is not my first codebase, but it has also been heavily vibe-coded. It is still very much an MVP. I’m posting partly to find out whether I have reinvented something that already exists, and to be pointed towards the thing I was actually looking for.