How to organize a knowledge base in Obsidian using the Luhmann method

I've been practicing Zettelkasten for the past five years and still haven't found anything better than Niklas Luhmann's method. The problem is that Obsidian doesn't support it out of the box, so I had to write a plugin for organizing notes as close to Luhmann's original method as possible.
I spent a couple of weeks digging through Luhmann's original archive before I understood how it actually works. Structurally, the archive resembles a table of contents, but with the difference that a note can be inserted at any point, adding nested chapters.

