Hacker News new | ask | show | jobs
Show HN: Markdown specs that don't compile (Pandoc and SQLite for typed docs) (github.com)
2 points by cclacerda13 121 days ago
Hi HN, I wanted to write specs in plain Markdown but needed proper DO-178C traceability. At some point I joked: “we just need to marry Pandoc and SQLite.” This started as an internal tool for airborne software specifications and has been dogfooded for a couple of years. I think it’s finally in a state where it’s useful beyond our walled garden. It’s open source. It’s alpha. Rough edges everywhere..But it compiles its own docs, so you can clone the repo and start working immediately.

SpecCompiler lowers Markdown into a typed relational intermediate representation (SpecIR) and executes declarative structural constraints over it. If traceability is broken, attributes are missing, or relations are ill-typed, the build fails. Else, it emits: DOCX (review-ready); HTML (with SQLite.js); ReqIF for interoperability; Anything pandoc can target.

The type system is extensible, you define your own types. The architecture is domain-agnostic. If you can express it as objects, attributes and relations you can type-check it. And it turns out, building a Markdown type system goes way beyond safety-critical software. It generates beautifully cross-referenced documents without TeX. The web page is an actual database you can query without a server.

I'm genuinely curious what people think of the Pandoc-to-SQLite-to-Pandoc architecture itself and if treating textual specifications as statically typed source code is overengineering or overdue?