A program called SolveSpace, which also performs 3D editing, will allow you to apply constraints in the manner you describe.
Fusion 360 also supports 2D construction, but it is also not limited to 2D and supports 3D modeling.
Not knowing your objection to 3D capability, it's difficult to accurately determine an optimum response. Feature rich is a somewhat ...
You might want to try
display simultaneously file tree and editor area (and be able to switch between files); CHECK
support markdown format (highlight markdown format and display formatted preview); CHECK
(nice to have) be able to display TOC generated from markdown headers in file; CHECK
be open source and work under Linux. CHECK
Try DynamoDB if you can pay for it. Yes, it doesn't match with your open-source requirement, but it does it all.
but it's semi-structured dynamically-changing data
ideal use-case for DynamoDB
As the table is not aimed to grow infinitely, each table could be stored in a JSON document using an array of arrays.
Dynamo tables are sets of key-value and can be ...
LibreOffice is a free, open source, GUI tool that can save to DocBook 5.1 XML ("File → Save As… → DocBook (xml)"). It can also read the DocBook files it generates.
There seems little documentation available, but I found out already that it seems based on proper use of the pre-defined paragraph and character styles:
Paragraph style "Heading 1" will be ...