Need to talk to @plinss about integration with Shepherd.
Note: see https://api.csswg.org/shepherd/ for API documentation.
Related issue: #1662
FWIW, the source code of Shepherd is here: http://hg.csswg.org/dev/
Specifically, the source of the specification DB/parser is here: http://hg.csswg.org/dev/specification/
Closing in favour of #1662
Most helpful comment
Note: see https://api.csswg.org/shepherd/ for API documentation.