Context
This is a follow-up to #110. I investigated adding the complete systemd documentation as systemd/systemd using the official repository:
https://github.com/systemd/systemd
A Markdown-only registry definition builds successfully, but it omits most of systemd's authoritative documentation.
Findings
The upstream documentation is split into two parts:
docs/: 95 supported Markdown files
man/: 484 DocBook XML files, approximately 8.1 MB
The Markdown-only prototype produced:
- 80 indexed documents
- 523 sections
- 219,498 tokens
This covers architectural and integration guides, but not the complete reference. Important documentation such as systemctl, journalctl, systemd.service, unit directives, network configuration, and most APIs lives under man/*.xml.
Context currently discovers Markdown, MDX, HTML, AsciiDoc, and reStructuredText, but not XML. Registry sources support Git and ZIP without a preprocessing step.
The XML cannot simply be treated as plain text:
- 388 files use XInclude
- 43 files reference generated entities
- 483 files declare DocBook DTDs
- upstream renders HTML using Meson and
xsltproc --xinclude
- generated HTML is not committed or provided as a release asset
The official rendered documentation is available at:
https://www.freedesktop.org/software/systemd/man/latest/
However, that site has no llms.txt, and the registry cannot currently build a package by following an HTML index.
Proposed solution
My preferred solution is safe native DocBook support:
- Recognize
.xml files whose root document is a supported DocBook type such as refentry.
- Resolve XInclude/XPointer references only within the cloned documentation root.
- Resolve required local entities without allowing external network access or arbitrary filesystem access.
- Convert DocBook sections, lists, tables, examples, commands, filenames, variables, and program listings into the existing parsed-document representation.
- Add support for multiple documentation roots, for example
docs and man, rather than scanning the entire source repository.
- Add security tests for external entities, path traversal, recursive includes, entity expansion, malformed XML, and oversized documents.
A possible alternative is a constrained HTML-index source that follows same-origin links from systemd's official rendered man-page index. This would be simpler for systemd but less reproducible and would make nightly builds depend on hundreds of individual website requests.
Context
This is a follow-up to #110. I investigated adding the complete systemd documentation as
systemd/systemdusing the official repository:https://github.com/systemd/systemd
A Markdown-only registry definition builds successfully, but it omits most of systemd's authoritative documentation.
Findings
The upstream documentation is split into two parts:
docs/: 95 supported Markdown filesman/: 484 DocBook XML files, approximately 8.1 MBThe Markdown-only prototype produced:
This covers architectural and integration guides, but not the complete reference. Important documentation such as
systemctl,journalctl,systemd.service, unit directives, network configuration, and most APIs lives underman/*.xml.Context currently discovers Markdown, MDX, HTML, AsciiDoc, and reStructuredText, but not XML. Registry sources support Git and ZIP without a preprocessing step.
The XML cannot simply be treated as plain text:
xsltproc --xincludeThe official rendered documentation is available at:
https://www.freedesktop.org/software/systemd/man/latest/
However, that site has no
llms.txt, and the registry cannot currently build a package by following an HTML index.Proposed solution
My preferred solution is safe native DocBook support:
.xmlfiles whose root document is a supported DocBook type such asrefentry.docsandman, rather than scanning the entire source repository.A possible alternative is a constrained HTML-index source that follows same-origin links from systemd's official rendered man-page index. This would be simpler for systemd but less reproducible and would make nightly builds depend on hundreds of individual website requests.